Localizing your AppGini apps
Note: This document is still work-in-progress that we'll expand later.

AppGini provides several options for localizing the generated applications. For stored data, you can set the date and time formats as well as the language encoding. You can also specify text direction (left to right or right to left). For the user interface, you can translate the interface using language files.
Translating the UI using language files
Among the generated files for your application, there are 2 language files that you can edit to translate the interface. Those 2 files are language.php, for translating the users' area, and language-admin.php for translating the admin area.
In the language files download page, you can find the already-translated language files for many language. They were generously contributed by users of AppGini. We're continuously looking for updates to existing files, as well as translations to new languages. You're welcome to contribute through our support page.
The fallback language file, defaultLang.php
As we release new versions of AppGini, we might add new lines to the generated English language files to represent new interface elements. But if you are using a translated language file, new interface elements would be missing from it, and would therefore be blank since they have no representation in your language file.
To avoid this, AppGini generates a third file, defaultLang.php, which includes all the lines in the language files, translated to English. You should NOT translate defaultLang.php. It only functions as a fallback for sentences not translated in the other language files. Its function is to make sure your applications continue to function normally even if some elements are missing from your translated language files.
How to edit the language files, and an example translation
The language files that ship with your AppGini application are normal PHP files, defining elements of an associative array. Each element represents a statement. You don't have to understand PHP or associative arrays in order to edit language files. All you need to know is that each line in the file defines a statement to be translated. The statement has a "key" string at the left, and a "value" string at the right. You should keep the key string as-is and only translate the value string.
Here is an example line taken from language.php:
$Translation['login failed'] = "Your previous login attempt failed. Try again.";
To translate it, say to Arabic, the translated line would look like this:
$Translation['login failed'] = "Ù…ØØ§ÙˆÙ„Ø© الدخول السابقة باءت Ø¨Ø§Ù„ÙØ´Ù„. ØØ§ÙˆÙ„ مرة أخرى";
The translation might look giberish to you. But the important point we want to emphasize is that you should translate only the value string at the right, and leave the key string at the left as-is.
