.gleef/config.json
file controls how Gleef CLI processes your localization files. This file is created automatically by gleef init
but can be customized for complex project setups.
Configuration Location
The configuration file is always located at:Basic Configuration Structure
Configuration Properties
localeFilePatterns
Type:string[]
Required: Yes Defines placeholder patterns that match your localization files. Each pattern must include the
{locale}
placeholder.
Placeholder | Description | Example |
---|---|---|
{locale} | Required - Locale identifier | en , fr-FR , es-ES |
{feature} | Optional - Feature/namespace name | common , auth , dashboard |
{namespace} | Optional - Alternative to feature | header , footer , modal |
Pattern | Matches | Structure |
---|---|---|
src/{locale}.json | src/en.json , src/fr.json | Simple structure |
locales/{locale}/{feature}.json | locales/en/common.json , locales/fr/auth.json | Locale-first namespacing |
i18n/{feature}.{locale}.json | i18n/common.en.json , i18n/auth.fr.json | Feature-first namespacing |
assets/{locale}/strings.xml | assets/en/strings.xml , assets/fr/strings.xml | Folder-based locales |
formatOptions
Type:object
Required: No Controls how different file formats are processed and generated.
JSON Options
nested
(boolean): Use nested object structure vs flat keys
XML Options
nested
(boolean): Use nested elements vs flat structure
YAML Options
nested
(boolean): Use nested structure vs flat keys
Strings Options
NonecustomLocaleNames
Type:object
Required: No Maps your company’s locale codes to the actual file or folder names in your project when they don’t match.
- Legacy naming conventions that can’t be changed
- Simplified locale names (
fr
instead offr-FR
) - Descriptive filenames in existing projects
- Platform-specific naming requirements (iOS:
en.lproj
)
- Company locale
"fr-FR"
maps to file/folder name"french"
- Pattern
src/{locale}.json
resolves tosrc/french.json
- Gleef treats this file as containing
fr-FR
translations
Advanced Configuration Examples
Multi-Module Project
Cross-Platform Project
Namespace-Organized Project
File Structure Examples
Nested JSON (Default)
Configuration:Flat JSON
Configuration:XML Structure
Configuration:Configuration Validation
Common Validation Errors
Missing Locale Placeholder:Troubleshooting
Configuration Issues
No files detected:- Check pattern syntax
- Verify file paths are correct
- Test patterns with file system tools
- Add exclusion patterns
- Make patterns more specific
- Check for conflicting patterns
- Validate JSON syntax
- Check property names and values
- Review format-specific options