HOME     PRODUCT     DEMO     DOWNLOADS     DOCUMENTATION     ABOUT     CONTACT  
 
<< Back to index

Internationalization and Multilingual

AxGui comes with multilingual support that let you present your website in more than one language other the default English. You may notice most CMS in the market only let you display your website with multilingual text but your editable content is still in single language. AxGui has the distinctive feature not only to let you display your site in multilingual but also let you save your editable data into multilingual database column. In this document multilingual support will be divided into two major discussion. The first is how we display multilingual labels, followed by how we save multilingual data in database column.

Display Multilingual Labels

Each AxGui module comes with multilingual text files which are commonly located at

/your/installation/path/lib/AxGui/module/lang/

In this folder you may notice two type of file extensions, which are *.lbl and *.opt. The *.lbl file is known as the label file, it is file type that keeps the labels that need to be displayed when user change language. Whereas, *.opt file is the options file, it is the file that keeps the label options which are usually used in multiple choices such as dropdown menu, radio button and checkboxes. The label and options files are merely a plan text file but it has to be saved as UTF-8 encoding to support unicode character such as Chinese and Japanese. Each label and options files has to be started with a language code for instance, EN_SYS.lbl and CN_SYS.lbl keeps the translation of Sys module in English and Chinese, EN_COUNTRY.opt and CN_COUNTRY.opt keeps the country names in English and Chinese.

The label in *.lbl file can also be accessed in the the template using ${label(...)} function. Please learn more about template function.

Saving Mutilingual Data in Database

Now we will discuss how AxGui save your editable data in to multilingual. During the installation you may choose more than one languages to be installed. If you have selected more than one language during the installation, AxGui will create multilingual columns in the database.

For instance, in USER_PROFILE database table. If you have selected English and Chinese during the installation then you may notice that the table contains these columns, FIRSTNAME, EN_FIRSTNAME and CN_FIRSTNAME.

  • FIRSTNAME is the default column to be used to save the first name if no language translation is supply.
  • EN_FIRSTNAME is the column to save English first name translation.
  • CN_FIRSTNAME is the column to save Chinese first name translation.

The following image shows that the first name and last name fields have a language tab on top of the text field for English and Chinese. Just switch around to edit the label for the selected language.

When display your editable content, AxGui will try to get the translation base on the user preference language. For instance if the user choose to display the page in Chinese, then the translation in CN_FIRSTNAME will be used.

Please note that not all columns need to be translated, column such as FIRSTNAME, LASTNAME are meaningful to be translated, column like EMAIL, URL, TELEPHONE are not meaningful to be translated. Please also bare in mind that translation only applies to columns with VARCHAR or TEXT data type. Other data type such as INTEGER, DATE, DATETIME are not meant to be translated.


Terms of Service    Privacy Policies
Copyright © 2009, AxGui.com, All Rights Reserved.