in english whole site
Home·Programming·CSE CMS·How To·Add a new Languagedeutsch·english·français
Contact & CommentsMinimizeHigherLower
» Visitor's comments
» Contact
» Hits: 3502  (details)
» Distinct visits: 1728 (1.4 Hit/visit)
» Bots visits: 1169 (Hits: 33.4%)
» Your hits in this session: 1
Add a new Language
In order to support a new language, you will have to:
  1. Choose 2 characters for the language,
  2. Provide translations,
  3. Provide a small "flag" image for the language selection, and
  4. update your directory structure.
1. Choose 2 characters
Each language is defined by 2 characters You can choose them arbitrarily, but it must be exactly 2 characters. It is advised to follow the standards for simpification.
For example, let's add Italian as "it".

2. Provide translations
In the file settings.php, many sentences are provided, such as
// language name:
$CSE_LANG["en"] = "english";
$CSE_LANG["fr"] = "franšais";
$CSE_LANG["de"] = "deutsch";

To support gracefully a new language, you will need to add a line for each of those texts. For instance to add italian:
// language name:
$CSE_LANG["en"] = "english";
$CSE_LANG["fr"] = "franšais";
$CSE_LANG["de"] = "deutsch";
$CSE_LANG["it"] = "italiano";

3. Provide a small picture
Search on the web for a small representative flag, and store it under "/CSE_Display/imazes" with a file name equal to the language 2-char code and the extension .gif.
For italian, it.gif.

4. Update directory structure
Add a new folder with the same name as the language 2-char code in your home folder (where the file CSE_CMS.php resides).
You can now add your content as you see fit.
Made with CSE_CMS, © CSE, 2008-2013