Rainbow Portal

 

How to localize Rainbow to a new language     6/28/2003

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.

OleDb database

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.

Importing from an existing table

First version of Rainbow used a legacy version of this database structure. For import your keys from old database to new follow these steps:

  1. Get a copy of new dab shipped with Esperantus or make a new one according specification in the previous paragraph.
  2. Decide which languages you want support.
  3. For each language you want support set the active flag in Esperantus_CulturesList table.
  4. Add as many columns as your languages on Esperantus_Language” table.
  5. Open your old database Language table.
  6. 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;
  7. Select all records from old db and copy them.
  8. Paste in the new table.

Editing keys

  

Exporting and compiling resources using Access

  • Press ProgressExport on Section From
  • You will get some files on the very same dir of the database:

File Name Notes
compileme.bat You get this file with Esperantus database. First time you should open it and check if all paths and variables are good for you.
complang.bat This file contains a reference to all generated resources files. It is auto generated each time you export.
Strings.resx Resource file for invariant culture
Strings.xx.resx Resource file for all cultures (you will get a number of this)

  • Start compilation by double clicking on compileme.bat
  • Temporary Strings.xx.resources will be created and silently removed.

Using Ms-Access spell checker

Here is a fast way of performing spell-check on all text of a single language:

  1. Open “Language.mdb”
  2. Open “Esperantus_Language” table
  3. Mark the language "xx" column, eg. "it", by clicking "xx" once and then press F7 (which is a shortcut for Tools/Spelling).
  4. Note that it stays in spelling mode until the end of the column!

Using Esperantus tools Open a Db Access

  1. Open Esperantus WebForm Tool
  2. Choose “Load” from file menu, select “MsAccess Database” in file type box and point to a valid language.mdb database
  3. You can edit keys.
  4. Remember to select save when done: it does not save automatically like access.

Open a Resources store

  1. Open Esperantus WebForm Tool
  2. Choose “Load” from file menu, select “XML Resource file” in file type box and point to invariant Resource file. E.g.: Strings.resx, or any valid resource file. An invariant resource must exist anyway or you will get an error.
  3. Now you can edit keys. Remember to save when done.
  4. You may save to a different store. E.g.: You may load from db and save on resources or load from resources and save to db.
  5. Each time you save you will do an update on the selected stores. No keys will be deleted so you could easily merge keys from different sources.

Rainbow standard

When you submit resources to rainbow please use the resx format.

Please test your translation with latest version before submitting.

Please send it to manu-dea@hotmailremoveme.it as zipped file.


<< Back      

powered by Rainbow with Rainbow.Zen