Wiki

Articles tagged with "i18n", sorted by viewsX
Displaying 11-20 of 26 result(s).

Multilanguage and SEO friendly

Created about a year ago by InterboyHow-tos1 comment – viewed 16,147 times – ( +5 ) – version 1.1
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

Simple example for language translation

Created about a year ago by RKAHow-tos2 comments – viewed 13,353 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

i18n for your model in just 1 line

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

Using SQLite and CDbMessageSource as a module

Created 3 years ago by pheadeauxHow-tos5 comments – viewed 11,988 times – ( +5 ) – version 1.1
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

Created 3 years ago by c@cbaHow-tos3 comments – viewed 10,494 times – ( +9 ) – version 1.1
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 obtain a grammatically correct translation of the model name in giix-generated view files

Created 3 years ago by c@cbaHow-tos0 comments – viewed 9,710 times – ( +4 ) – version 1.1
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.

Entire Messages into javascript object

Created 2 years ago by markuxHow-tos0 comments – viewed 5,212 times – ( +2 ) – version 1.1
I needed all messages with their translation into javascript. This is my solution:

Expert's model generation with Gii

Created 11 months ago by le_topTips0 comments – viewed 5,107 times – ( +3 ) – version 1.1
Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.

How to provide a fallback or mapping for translation messages?

Created 2 years ago by schmunkHow-tos1 comment – viewed 4,255 times – ( +5 ) – version 1.1
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.

I18n / localised routes in Yii

Created about a year ago by ElecenHow-tos3 comments – viewed 2,696 times – ( +3 / -1 ) – version 1.1
So, you need localised urls made simple that follow the Yii framework guidelines?
tags: i18n, Routing