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
countrytable. - Add row to
lookup_valuetable using a Java-based upgrade. SeeUpgrade208.javafor an example on how to do this. - Add row to
languagetable, if necessary. - Add row to
supported_localetable. - 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.sqlandupgrade_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.
- Find the java upgrade called
- 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
currencytable, 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
- Insert all ISO language codes and country codes
- Autodetect locales in the software and automatically insert necessary database records
, multiple selections available, Use left or right arrow keys to navigate selected items