Showing 361-380 of 652 items.

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

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 3 comments

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.

9 0
9
Viewed: 23 963 times
Version: 1.1
Category: How-tos

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 14 years ago by c@cba c@cba, updated 12 years ago by nsanden nsanden. 4 comments

Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options.
The main code was contributed by zaccaria in the forum (see [this post](...

10 0
11
Viewed: 57 474 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 0 comments

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.

4 0
1
Viewed: 23 379 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 37 comments

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...

28 0
42
Viewed: 85 231 times
Version: 1.1
Category: Tutorials

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 10 comments

In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...

9 0
19
Viewed: 55 438 times
Version: 1.1
Category: Tutorials

Use application on production/development environment without making changes

Created 14 years ago by ifdattic ifdattic, updated 14 years ago by ifdattic ifdattic. 3 comments

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11
Viewed: 81 456 times
Version: 1.1
Category: Tips