Search:     Advanced search

How to add Flag of my country to render into our Language

Article ID: 86
Last updated: 20 Aug, 2011
Revision: 1
Print
Email to friend
Views: 0

By Default, the application are loaded with flags of all majors countries. Therefore just Open aplication/layouts/scripts/carcms/blocks/change_lang.phtml page please add the following code

<a class="change_lang" rel="xx_XX" href="javascript:void(0);"> <img src="images/adminImages/flagsImage/XX.gif" border="0" title="MY-LANGUAGE" />

Language codes follow the convention of a two letter lowercase language name, followed by an underscore, followed by two upper-case latters signifying the country code which follows i18n localization standard. According the codes above, Here in the rel attribute of tag a 'xx_XX' is the language code that you put in application/modules/Settings/forms/en_US.GlobalSettingsForm.ini.

Please open application/modules/Settings/forms/source/en_US.GlobalSettingsForm.ini file and find below line :
settings.elements.default_language.options.multiOptions.fr_FR = "French" and add an new line to include your language as follows : 

Example : settings.elements.default_language.options.multiOptions.xx_XX = "My new XX Language" and finally save it.

The Country based flag images are located at images/adminImages/flagsImage/ directory in .gif extension. Choose your flag and pick the correct image file to display it accordingly. Please see the screen shots shown below.

 

This article was:  
Also read
document Language architecture and it hierarchical overview
document Localize in a new language.

Also listed in
folder Modules Wise Documentation -> Multi-Language

Prev   Next
How to link a Menu with a Content or Extension page ?     Managing and Customizing Header and Footer