Wiki

Articles tagged with "i18n", sorted by date (updated)X
Displaying 1-10 of 18 result(s).

Simple example for language translation

Updated 3 days ago by CeBeHow-tos2 comments – viewed 2,577 times – ( +1 ) – version 1.1
Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.
tags: yii, i18n

Multilanguage and SEO friendly

Updated 5 months ago by InterboyHow-tos1 comment – viewed 7,980 times – ( +5 )
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

How to translate and do the translations the easy way

Updated 8 months ago by Roman SolomatinHow-tos3 comments – viewed 39,501 times – ( +24 / -2 ) – version 1.1
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
tags: i18n

How to provide a fallback or mapping for translation messages?

Updated 10 months ago by schmunkHow-tos1 comment – viewed 2,771 times – ( +5 )
Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

How to set up Unicode

Updated 11 months ago by Roman SolomatinHow-tos10 comments – viewed 55,185 times – ( +18 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

Using International Dates

Updated about a year ago by nkdHow-tos4 comments – viewed 26,584 times – ( +18 ) – version 1.1
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/

Entire Messages into javascript object

Updated about a year ago by markuxHow-tos0 comments – viewed 3,981 times – ( +2 ) – version 1.1
I needed all messages with their translation into javascript. This is my solution:

Custom Number Formatting or Decimal Separators and i18n

Updated about a year ago by c@cbaTutorials6 comments – viewed 24,778 times – ( +5 ) – version 1.1
By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

Setting and maintaining the language in Application (i18n)

Updated about a year ago by Yang HeTutorials11 comments – viewed 68,036 times – ( +23 ) – version 1.1
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

How to customize Yii core messages?

Updated about a year ago by Yang HeTutorials7 comments – viewed 37,983 times – ( +16 ) – version 1.1
Yii core messages refer to static text strings in the core Yii framework code which are meant to be displayed to end-users (e.g. core exception messages, default validation error messages). Customization of these core messages is needed in two circumstances: