Wiki

Articles tagged with "i18n", sorted by commentsX
Displaying 11-16 of 16 result(s).

How to translate and do the translations the easy way

Created about a year ago by Roman SolomatinHow-tos3 comments – viewed 25,537 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

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

Created about a year ago by c@cbaHow-tos2 comments – viewed 5,660 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.

How to provide a fallback or mapping for translation messages?

Created 13 days ago by schmunkHow-tos1 comment – viewed 1,044 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 obtain a grammatically correct translation of the model name in giix-generated view files

Created about a year ago by c@cbaHow-tos0 comments – viewed 5,188 times – ( +4 )
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) . But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

i18n for your model in just 1 line

Created 3 years ago by mintaoTutorials0 comments – viewed 8,674 times – ( +12 )
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n

Entire Messages into javascript object

Created 9 months ago by markuxHow-tos0 comments – viewed 2,673 times – ( +1 )
I needed all messages with their translation into javascript. This is my solution: