<%@ Title="Internationlization in PRADO" Page.Application.Globalization.TranslationCatalogue="index" %>

Internationlization in PRADO

This demo shows the basic components available in PRADO for the process of Internationalizing and Localizing web applications. This page utilize multiple locale (or culture) aware templates to show the appropriate localized page. To view a different localized version, please change your language settings in your browser.

Your current culture is <%= $this->Page->CurrentCulture %>.

In addition to culture aware template. Text can be localized using many different translation sources. PRADO provides gettext, XML, SQLite, and MySQL container for storing message translations. The example in the following link demonstrates how text can be localized using the TTranslate component.


Introduction

Developing and maintaining multi-language sites is a common problem for web developers.

Internationalization (I18N)
Process of developing a product in such a way that it works with data in different languages and can be adapted to various target markets without engineering changes.
Localization (L10N)
Subsequent process of translating and adapting a product to a given market's cultural conventions.

The following features are supported by PRADO:

Examples

Date: full pattern, en_GB culture

Example:

<com:TDateFormat ID="Time1" Pattern="full" Culture="en_GB"/>

Result:



Date: short pattern

Example:

<com:TDateFormat ID="Time2" Pattern="short" />

Result:



Date default pattern of <%= $this->Page->CurrentCulture %>

Example:

<com:TDateFormat ID="Time3" Value="2004/12/06" />

Result:



Currency default format

Example:

<com:TNumberFormat Type="currency" Value="12.4" />

Result:



Currency, de_DE culture with Euro

Example:

<com:TNumberFormat ID="Number2" Type="currency" Culture="de_DE" Currency="EUR"/>

Result:



Currency, US format with Euro

Example:

<com:TNumberFormat Type="currency" Culture="en_US" Currency="EUR" Value="100" />

Result



Translation examples

Example:

<com:TTranslate>Hello</com:TTranslate>

Result:

Hello

Example:

<com:TTranslate Text="Goodbye" />

Result:



Using localization tag

Example:

<%[ Goodbye ]%>

Result:

<%[ Goodbye ]%>

Translation using a different catalogue

Example:

<com:TTranslate Text="Goodbye" Catalogue="tests" />

Result:



Translation with parameter substitution

Example:

<com:TTranslate> {greeting} {name}!, The unix-time is "{time}". <com:TTranslateParameter Key="name"> <com:TTranslate Catalogue="tests" Text="World" /> </com:TTranslateParameter> <com:TTranslateParameter Key="greeting" Value="Hello" /> <com:TTranslateParameter Key="time" Value="<%= Time() %>" /> </com:TTranslate>

Result:

{greeting} {name}!, The unix-time is "{time}".
$Id$