Setting languages

Modified on 2011/04/26 20:54 by Charles — Categorized as: GUI, Website Design

Table of Contents [Hide/Show]


   Setting Languages
         Adding Languages
         Language algorithm
      The rules
      Sample Data
      How it works
      Notes


Setting Languages

Check out Languages and Web Pages to learn how users of your website see multi-language pages.

This page describes how languages work. COR supports multiple languages as well as dialects of the same language.

Adding Languages

COR ships with a default language - English. Country-specific english idioms can be added to the database for any phrase. Additional base languages can be added, e.g. French, German, etc. Country-specific idioms are then added for any phrase.

Language algorithm

The default language for a user is English-Canada. Language retrieval follows this algorithm:
  1. Retrieve the English-Canada phrase first.
  2. If this is blank, then the base English phrase is retrieved.

The algorithm is similar for other languages. e.g. a french-Canadian follows this alorithm:
  1. Retrieve the French-Canadian phrase.
  2. If blank, retrieve the base French phrase.
  3. If blank, retrieve the base English phrase.

The rules

  1. English is the base language. It is used as the default for all strings.
  2. The base English language is denoted by 'en'.
  3. Dialects of English are supported:
    • Canadian English is denoted by 'en-ca'
    • American English is denoted by 'en-us'
    • British English is denoted by 'en-uk'
    • Dialects that do not have a value default to the base language.
  4. The base French language is denoted by 'fr'.
    • Canadian French is denoted by 'fr-ca'.

Sample Data

String Name: Select_Language 'en' = Select Language 'en-ca' = Select your favourite language 'en-us' = Select your favorite language 'fr' = Sélectionnez la langue

How it works


Notes

The base language always has a string value. If a dialect language does not have a value for a named string, then it defaults to the base language.