Wiki

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

How to provide a fallback or mapping for translation messages?

Updated 12 days ago by schmunkHow-tos0 comments – viewed 995 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 about a month ago by Roman SolomatinHow-tos9 comments – viewed 37,544 times – ( +16 )
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

How to translate and do the translations the easy way

Updated 4 months ago by Roman SolomatinHow-tos3 comments – viewed 25,474 times – ( +17 / -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

Using International Dates

Updated 7 months ago by nkdHow-tos3 comments – viewed 19,894 times – ( +16 )
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 9 months ago by markuxHow-tos0 comments – viewed 2,668 times – ( +1 )
I needed all messages with their translation into javascript. This is my solution:

Custom Number Formatting or Decimal Separators and i18n

Updated 10 months ago by c@cbaTutorials6 comments – viewed 11,023 times – ( +3 )
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 11 months ago by Yang HeTutorials9 comments – viewed 49,682 times – ( +19 )
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 11 months ago by Yang HeTutorials6 comments – viewed 28,764 times – ( +14 )
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:

Using SQLite and CDbMessageSource as a module

Updated 11 months ago by pheadeauxHow-tos4 comments – viewed 4,684 times – ( +4 )
There are scenarios when you work with DVCS (like Mercurial or Git) and CDbMessageSource. To my experience keeping the development database and production database in sync can be very time consuming. Plus, when working in a team, you never know when the database was updated.

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Updated about a year ago by c@cbaHow-tos2 comments – viewed 5,649 times – ( +9 )
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.