Adding new locales to specific projects

These are instructions in order to add new locales to Android mobile products living within the android-l10n project.

Edit the l10n.toml file(s)

All android-l10n products live within the android-l10n project. Depending on the product that requires a new locale to be added, the corresponding l10n.toml file will have to be edited by adding the new locale code in it.

The l10n.toml files live in their corresponding project folder, located here for:

Each l10n.toml file typically looks like this:

basepath = "."

locales = [
    "ab-CD",
    "an",
    "ar",
    "as",
    "ast",
    "az",
...
]

# Expose the following branches to localization
# Changes to this list should be announced to the l10n team ahead of time.
branches = [
    "master",
]

[env]

[[paths]]
  reference = "app/src/main/res/values/strings.xml"
  l10n = "app/src/main/res/values-{android_locale}/strings.xml"

Identify the locales section, add the desired new locale code in this list. With Atom and the Sort Lines package installed, you can press F5 to make sure that the list is in alphabetical order.

Save your edited file, then commit and push from your branch to the android-l10n repository.

Note that all products except Firefox for Fire TV share strings with Android Components, so you will also have to edit the Android Components l10n.toml file and add the new locale there.

Add new locales to Pontoon

Once the patch has landed, the new locale has to be added in Pontoon as well. The steps to follow can be found in the existing Pontoon documentation here.