O'Reilly logo

Mastering Yii by Charles R. Portwood II

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The application language

Before we can start using Yii2's translation features, we need to define the application our language is written in. Application languages in Yii2 are defined by a unique ID consisting of a language ID as defined by the ISO-639 format and a region ID defined by the ISO-3166 format. As an example, en-US represents English as the spoken language in the United States of America.

Tip

Details on ISO-639 can be found at http://www.loc.gov/standards/iso639-2/, and details on IISO-3166 can be found at https://www.iso.org/obp/ui/#search.

Yii2 defines two language properties within our configuration file that we can define. The first sourceLanguage property represents the language or locale our application is written in and generally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required