Wiki articles tagged with "i18n"

Showing 1-20 of 29 items.

Expert's model generation with Gii

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

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.

1 0
2 followers
Viewed: 19 125 times
Version: 1.1
Category: Tips

i18n for your model in just 1 line

Created 15 years ago by mintao mintao, updated 15 years ago by Orteko Orteko.

A simple trick to get the localized version of a model field is to add this little method to your models.

12 0
9 followers
Viewed: 21 567 times
Version: 1.1
Category: Tutorials
Tags: i18n

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

Created 13 years ago by c@cba c@cba, updated 13 years ago by c@cba c@cba.

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 follower
Viewed: 21 375 times
Version: 1.1
Category: How-tos

Entire Messages into javascript object

Created 13 years ago by markux markux, updated 13 years ago by markux markux.

I needed all messages with their translation into javascript. This is my solution:

1 0
3 followers
Viewed: 12 027 times
Version: 1.1
Category: How-tos

Themed translations (i18n)

Created 11 years ago by le_top le_top, updated 11 years ago by le_top le_top.

When using themes you want to changes some of the translations specifically to the theme while keeping the standard translations for most of the text. Duplicating the main translation file is a headache for maintainance. This how to provides a solution.

1 0
1 follower
Viewed: 18 463 times
Version: 1.1
Category: How-tos

Gettext and Poedit HOWTO

Created 11 years ago by Maug Lee Maug Lee, updated 11 years ago by Maug Lee Maug Lee.

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 14 774 times
Version: 1.1
Category: Tutorials

Getting information from the current locale

Created 7 years ago by CeBe CeBe, updated 7 years ago by CeBe CeBe.

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 24 221 times
Version: 2.0
Category: How-tos

CJuiDatePicker extended for more/better language support

Created 10 years ago by le_top le_top, updated 10 years ago by le_top le_top.

The number of languages supported by the standard CJuiDatePicker implementation is limited and the language code to use is different from the application's language code. This Wiki shows how to improve on that.

1 0
1 follower
Viewed: 13 580 times
Version: 1.1
Category: How-tos

Selecting best language based on Browser language and available languages.

Created 10 years ago by le_top le_top, updated 10 years ago by le_top le_top.

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.

2 0
1 follower
Viewed: 17 865 times
Version: 1.1
Category: Tips

How to provide a fallback or mapping for translation messages?

Created 12 years ago by schmunk schmunk, updated 10 years ago by schmunk schmunk.

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.

3 0
6 followers
Viewed: 14 583 times
Version: 1.1
Category: How-tos

Multilanguage and SEO friendly

Created 12 years ago by Interboy Interboy, updated 11 years ago by Rohit Suthar Rohit Suthar.

In your application configuration (protected/config/main.php), set the sourceLanguage parameter to English:

4 0
8 followers
Viewed: 31 775 times
Version: 1.1
Category: How-tos

YII2 : simple language Switcher Widget

Created 10 years ago by phunsanit phunsanit, updated 10 years ago by phunsanit phunsanit.
  1. create file common\components\languageSwitcher.php
1 0
5 followers
Viewed: 33 356 times
Version: 2.0
Category: Tutorials

Language Selector

Created 9 years ago by Programmer Thailand Programmer Thailand, updated 9 years ago by Programmer Thailand Programmer Thailand.

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 18 870 times
Version: 2.0
Category: Tutorials

Create URL to language switcher anchor with langhandler

Created 11 years ago by Anas AbuDayah Anas AbuDayah, updated 11 years ago by Anas AbuDayah Anas AbuDayah.

This topic is related with langhandler extension

1 1
2 followers
Viewed: 12 548 times
Version: 1.1
Category: Tips

Simple example for language translation

Created 11 years ago by RKA RKA, updated 11 years ago by CeBe CeBe.

Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.

1 0
5 followers
Viewed: 40 302 times
Version: 1.1
Category: How-tos
Tags: i18n, Yii

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

Created 13 years ago by c@cba c@cba, updated 13 years ago by c@cba c@cba.

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 followers
Viewed: 21 634 times
Version: 1.1
Category: How-tos
1 0
5 followers
Viewed: 12 452 times
Version: 1.1
Category: How-tos
Tags: i18n, Routing

How to add a DropDown Language Picker (i18n) to the Menu

Created 2 years ago by JQL JQL, updated a year ago by JQL JQL.

Yii comes with internationalisation (i18n) "out of the box". There are instructions in the manual as to how to configure Yii to use i18n, but little information all in one place on how to fully integrate it into the bootstrap menu. This document attempts to remedy that.

1 0
1 follower
Viewed: 94 051 times
Version: 2.0
Category: How-tos

Using International Dates

Created 14 years ago by Russell England Russell England, updated 13 years ago by nkd nkd.

So here is my complete solution - note that I'm using the 'short' date format throughout.

15 0
24 followers
Viewed: 52 196 times
Version: 1.1
Category: How-tos

Using SQLite and CDbMessageSource as a module

Created 13 years ago by pheadeaux pheadeaux, updated 13 years ago by pheadeaux pheadeaux.

There are scenarios when you work with DVCS (like [Mercurial]( http://mercurial.selenic.com/) or [Git]( http://git-scm.com/)) and CDbMessageSource. To my experience keeping the development database and production database in sync can be very...

3 0
9 followers
Viewed: 24 006 times
Version: 1.1
Category: How-tos