Wiki

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

Custom Number Formatting or Decimal Separators and i18n

Created 3 years ago by c@cbaTutorials8 comments – viewed 49,517 times – ( +7 ) – 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...

Local time zones and locales

Created 5 years ago by Russell EnglandHow-tos9 comments – viewed 65,362 times – ( +14 / -2 ) – version 1.1
Following on from international dates, I also wanted times in the local timezone and format. This was a little more tricky but I think I've got a solution. This is only really appropriate if you have an international app.

Multilanguage and SEO friendly

Created 2 years ago by InterboyHow-tos1 comment – viewed 19,247 times – ( +5 ) – version 1.1
In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

Using SQLite and CDbMessageSource as a module

Created 4 years ago by pheadeauxHow-tos5 comments – viewed 13,734 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 provide a fallback or mapping for translation messages?

Created 3 years ago by schmunkHow-tos1 comment – viewed 5,184 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.

How to obtain a grammatically correct translation of the model name in giix-generated view files

Created 4 years ago by c@cbaHow-tos0 comments – viewed 10,823 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.

Expert's model generation with Gii

Created about a year ago by le_topTips0 comments – viewed 6,920 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.

Selecting best language based on Browser language and available languages.

Created about a year ago by le_topTips0 comments – viewed 4,250 times – ( +2 ) – version 1.1
Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.

Entire Messages into javascript object

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

I18n / localised routes in Yii

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