Wiki

Articles tagged with "i18n", sorted by date (updated)X
Displaying 11-20 of 24 result(s).

How to set up Unicode

Updated about a year ago by Roman SolomatinHow-tos10 comments – viewed 64,991 times – ( +19 ) – 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 2 years ago by nkdHow-tos4 comments – viewed 29,885 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 2 years ago by markuxHow-tos0 comments – viewed 4,673 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 2 years ago by c@cbaTutorials8 comments – viewed 33,394 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...

Setting and maintaining the language in Application (i18n)

Updated 2 years ago by Yang HeTutorials11 comments – viewed 79,383 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 2 years ago by Yang HeTutorials7 comments – viewed 43,088 times – ( +18 ) – 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:

Using SQLite and CDbMessageSource as a module

Updated 2 years ago by pheadeauxHow-tos5 comments – viewed 10,665 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

Updated 2 years ago by c@cbaHow-tos3 comments – viewed 9,540 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

Updated 2 years ago by c@cbaHow-tos0 comments – viewed 8,807 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.

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Updated 2 years ago by c@cbaTutorials36 comments – viewed 42,417 times – ( +32 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.