Wiki articles in category Tutorials tagged with "language"

Showing 1-5 of 5 items.

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 17 796 times
Version: 2.0
Category: Tutorials

YII2 : simple language Switcher Widget

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

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

Created 13 years ago by c@cba, updated 13 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: 79 725 times
Version: 1.1
Category: Tutorials

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

Created 13 years ago by c@cba, updated 13 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: 51 519 times
Version: 1.1
Category: Tutorials

Multilanguage web site controlling by get request and database allowed languages

Created 14 years ago by Igor Ivanovic, updated 13 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: 31 853 times
Version: 1.1
Category: Tutorials