Voog.com

Language

Enables access to links related to site language environments.

Available properties

These properties give access to extra features on this object.

code

2-character language code, such as "en"

region

2-character region code for languages that support regions. E.g. "GB" or "BR", nil otherwise.

locale

Equal to the value of code for region-less languages. If a language supports regions, this is a concatenation of the language code, an underscore and the region code, e.g. "en_GB".

selected?

Returns true if language is selected

published?

Returns true if language is publicly visible

title

Returns language title set when creating this language environment

url

Returns address for translation of this page in another language. If such page does not exist, it will return address to home page in this language.

to_json

Serializes the language into a JSON string.