AS application allows you to easily translate the whole interface to any language you want. All locales are simple .php
files located inside Lang
folder.
Available Locales
Out of the box, there are 7 different locales that come with AS:
- English
- Spanish
- French
- Russian
- German
- Serbian (Cyrillic) and
- Swedish
Adding New Locale
If you want to add new locale, all you need to do is to make a copy of existing language file (en.php for example) located inside Lang directory, rename it to ru.php
for example, and translate it. Of course, since this translation file is organized as PHP array, you only translate those values to the right of =>
sign.
Next step you need to do is to add a new flag (or organize it however you want) and create a link that will point to ?lang=ru
, and that's it.
Example:
<a href="?lang=ru">Russian</a>
Setting Default Locale
If you want to set up default application locale, all you need to do is to define it inside ASConfig.php
file, like the following:
define('DEFAULT_LANGUAGE', 'es');
Note! You can name the language files however you want, but you must use the same name (without .php extension) when you define default language or change language by clicking the country icon.
For example, if you create a file named es.php
for the Spanish language, then you will use es
everywhere you need to set the language to Spanish.