Config File
Define the babli.json
config file in the root of your project.
Example
{ "projectId": "1234567890", "translationFiles": ["src/locales/{lang}.json"]}
Options:
projectId
stringThe project ID. You can find it in the project settings.
sortBy
enumHow to sort the keys in the file
Default: "original"
Allowed values:
translationFiles
object[]Source files for the translations.
path
stringThe path to the translation file. Use {{lang}} placeholder to define the language code.
languages
string[](optional)Babli will autodetect languages by default, but in case you need different languages with different languages, you can define the languages here.
format
enum(optional)Babli will autodetect format from file extensions. But if using non-standard extensions, you can change format here.
Allowed values:
nested
booleanDefine if keys should be exported as nested values `{ "a": { "b": "x"}}` or not nested `{ "a.b": "x" }`
Default: true
topLevelLanguageCode
booleanDefault: false
pullWithEmptyValues
booleanDefault: false
yaml
objectDefault: {}
version
string(optional)sortBy
enumDefault: "original"
Allowed values:
emptyValueString
string(nullable)In case you use some specific value to mark the value is not translated yet, For example 'NOT_TRANSLATED', You can define it here.
Default: null