Wiki articles tagged with "language"

Showing 1-9 of 9 items.

Getting information from the current locale

Created 4 years ago by CeBe, updated 4 years ago by 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: 18 872 times
Version: 2.0
Category: How-tos

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 14 996 times
Version: 2.0
Category: Tutorials

YII2 : simple language Switcher Widget

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

Selecting best language based on Browser language and available languages.

Created 7 years ago by le_top, updated 7 years ago by 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: 14 234 times
Version: 1.1
Category: Tips

CJuiDatePicker extended for more/better language support

Created 8 years ago by le_top, updated 8 years ago by 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: 10 649 times
Version: 1.1
Category: How-tos

Create URL to language switcher anchor with langhandler

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

This topic is related with langhandler extension

1 1
2 followers
Viewed: 10 137 times
Version: 1.1
Category: Tips

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

Created 11 years ago by c@cba, updated 11 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
42 followers
Viewed: 72 970 times
Version: 1.1
Category: Tutorials

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

Created 11 years ago by c@cba, updated 11 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
19 followers
Viewed: 48 227 times
Version: 1.1
Category: Tutorials

Multilanguage web site controlling by get request and database allowed languages

Created 11 years ago by Igor Ivanovic, updated 11 years ago by rei.

First, you have to have create database table for default language and allowed languages.

CREATE TABLE IF NOT EXISTS `tbl_languages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lang` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `flagpath` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_...
5 0
12 followers
Viewed: 29 199 times
Version: 1.1
Category: Tutorials