Skip to content

Config File

Define the babli.json config file in the root of your project.

Example

{
"projectId": "1234567890",
"translationFiles": ["src/locales/{lang}.json"]
}

Options:

projectId

string

The project ID. You can find it in the project settings.

sortBy

enum

How to sort the keys in the file

Default: "original"

Allowed values:

keyvalueoriginal

translationFiles

object[]

Source files for the translations.

path

string

The 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:

jsonyamlflutterArbtypescript

nested

boolean

Define if keys should be exported as nested values `{ "a": { "b": "x"}}` or not nested `{ "a.b": "x" }`

Default: true

topLevelLanguageCode

boolean

Default: false

pullWithEmptyValues

boolean

Default: false

yaml

object

Default: {}

version

string(optional)

sortBy

enum

Default: "original"

Allowed values:

keyvalueoriginal

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