Wiki articles in category Tutorials tagged with "i18n"

Showing 1-10 of 10 items.

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

1 0
5 followers
Viewed: 9 530 times
Version: 2.0
Category: Tutorials

YII2 : simple language Switcher Widget

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

Gettext and Poedit HOWTO

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

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 8 939 times
Version: 1.1
Category: Tutorials

Custom Number Formatting or Decimal Separators and i18n

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

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

4 0
17 followers
Viewed: 65 723 times
Version: 1.1
Category: Tutorials

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

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

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
43 followers
Viewed: 65 211 times
Version: 1.1
Category: Tutorials

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

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

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
20 followers
Viewed: 42 867 times
Version: 1.1
Category: Tutorials

i18n for your model in just 1 line

Created 9 years ago by mintao, updated 8 years ago by 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: 15 448 times
Version: 1.1
Category: Tutorials
Tags: i18n

I18n subdomains and url-rules

Created 9 years ago by Y!!, updated 8 years ago by atrandafir.

This guide is for more or less advanced users. If you just started with Yii or didn't worked with any web-framework before, you may should come back later :-)

7 0
17 followers
Viewed: 34 321 times
Version: 1.1
Category: Tutorials
Tags: i18n, URL

Setting and maintaining the language in Application (i18n)

Created 10 years ago by olafure, updated 6 years ago by Yang He.

As seen in this post, Yii doesn't enforce how language is set and maintained within the session.

18 0
30 followers
Viewed: 112 267 times
Version: 1.1
Category: Tutorials

How to customize Yii core messages?

Created 10 years ago by qiang, updated 6 years ago by Yang He.

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:

17 0
17 followers
Viewed: 57 796 times
Version: 1.1
Category: Tutorials