Localize HOW-TO
This step by step procedure shows you how to localize Rainbow in your language.
Prerequisites
Ms Access 2000 or XP installed on your machine for db version.
Net framework 1.0 or above for Esperantus tools.
Language conventions
The culture names follow the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, U.S. English is "en-US". Some culture names have prefixes that specify the script; for example, "Cy-" specifies the Cyrillic script, "Lt-" specifies the Latin script.
For a complete list of culture code refer to:
CultureInfo Class
Background info
The Rainbow dir structure is:
In the bin dir there are all dll’s… Main language dir (default = en) is in bin dir with Rainbow.dll.
Additional resource languages are all named Language.resources.dll and are placed in bin subdirs that have the name equal to their language code.
Using OleDB as data provider and specifying a connection string pointing to a valid source you may provide your custom implementation.
Here it is the structure that Esperantus expect from you.
A Table or a view named: “Esperantus_CulturesList” – to avoid conflicts with existing tables name. This table has 2 mandatory fields. You may add other fields if you like but will be ignored.
NOTE: Invariant culture is always added so you should never add it explicitly.
Field Name Data Type Size Notes
Name Text 12 Culture name
Active Bit 1 If the culture is present on database
A Table or a view named: “Esperantus_Language” – to avoid conflicts with existing tables name. This table has 2 mandatory fields. All other are optional.
Field Name Data Type Size Notes
KEY Text 50 The key name – Should be store in Upper case if possible
Invariant Text 255 Translation for invariant culture
<culture name> Text 255 Translation for <culture name>
NOTE: You may provide as many cultures as you like on this table according specific limits of your database (MS-SQL for example has an 8000 chars per row limit). For each language the you enter you may set the Active flag to true on appropriate row of Esperantus_CulturesList table.
NOTE: You MUST specify a column if you set the active bit in Esperantus_CulturesList table.
E.g. : if you make “it” culture as active in Esperantus_CulturesList table you must have a column named “it” in “Esperantus_Language” table or an error will be thrown. If you want temporarily ignore an existing column simply set Active bit as false.
First version of Rainbow used a legacy version of this database structure. For import your keys from old database to new follow these steps:
- Get a copy of new dab shipped with Esperantus or make a new one according specification in the previous paragraph.
- Decide which languages you want support.
- For each language you want support set the active flag in Esperantus_CulturesList table.
- Add as many columns as your languages on “Esperantus_Language” table.
- Open your old database Language table.
- Provide all language you want support are shown on screen, hide languages that are not on new table. Languages must be exactly in the same order of the new table even if column name does not match. Drag and drop columns if needed. There were not an Invariant column in old db, use en column instead. E.g. : Old db: KEY|en|it; New Db: KEY|Invariant|it;
- Select all records from old db and copy them.
- Paste in the new table.
Editing keys
Exporting and compiling resources using Access