Adding a New Locale

Adding a New Locale

Add your locale

Adding a new locale is a manual process requiring knowledge of SQL and Mifos internals. The code for Mifos itself must be changed. Here is a rough outline.

  • Find the section of latest-data.sql where other locales are added. Follow their pattern.

    • Note: in the following tasks, increment ids as necessary for new records.

    • Add row to country table.

    • Add row to lookup_value table using a Java-based upgrade. See Upgrade208.java for an example on how to do this.

    • Add row to language table, if necessary.

    • Add row to supported_locale table.

    • Increment the database version in this file

  • Add an entry for your language name in LookupValueMessages.properties. This file allows the language names to be localized.

  • Create a java-based database upgrade for the new languages:

    • Find the java upgrade called Upgrade208.java. This has 2 supporting sql files, upgrade_to_208_part_1.sql and upgrade_to_208_part_3.sql.

    • Copy these files and rename them with the number of your upgrade.

    • Change the contents of the files as appropriate:

      • country codes go in part 1

      • language codes go into the java upgrade class (part 2)

      • locale names go into part 3.

  • Run the test LatestTestAfterCheckpoint.java - this will check whether the upgrade matches your latest-data.sql. If it doesn't pass, debug. If it passes, run all the tests and check in!

Optional:

  • Add row to currency table, if necessary.

  • If you added a new language, translate resources bundles in src/org/mifos/config/localizedResources.

  • localize language/country-specific JavaScript files

See latest_data.sql for examples of the necessary SQL (near Spanish locale support).

See AdminOnlineTranslationHOWTO for ISO language and country codes.

Use your locale

Enable your new locale in a custom application-wide configuration file

Possible improvements