Administration/System/Languages manager
From Lanius CMS Wiki
Lanius CMS websites can support various languages for their interface messages (this page is not about Multi-language content).
If you are an administrator of an international website, you should consider installing as many languages as possible, so your visitors can access the website in their national (or spoken) language.
You can manage languages from the Administration/System/Languages manager page of the administration backend; there are actions regarding language maintenance (repair, normalize, verify and edit) and actions regarding language packages maintenance (create or install new or delete existing).
You can view language details, by clicking on Info hyperlink, which is available next to the language name.
Contents |
Creating a new language
The Lanius CMS project supports the production of new languages, to help diversify the product and to make it available to people from all over the world (that's why creating new languages by yourself is often unnecessary: you should check that they are not already maintained by somebody else at the official website).
To create a new language click on Create button, after which the Create Language page will be displayed.
In the corresponding fields, provide the details of new language:
- Assigned Country Code - Select country for which you are creating new language;
- Name - Translated name of your language;
- Version - Version of your language, usually starts from 0.1;
- Author - author fullname (or nickname);
- E-mail - Your e-mail address (optional);
When you've finished, press the Create button. The new language is created, and you are transferred to the File Selection page which contain a list of all language files that constitute the language and amount of resources listed in them.
To make changes to any of the language files you must select the language file then press edit. A new form should load allowing you to edit the language resources, once done press on the save button.
Installing a language package
A language can be installed either by an install procedure or through drop-in copy.
Install procedure
You can install new languages by clicking on Install button, after which the Install Language page will be displayed. There are three methods you can install a language: by uploading a file, by providing destination to a remote URL, and by specifying a local path on the server.
At this moment, you should choose one of them and click on appropriate tab:
- Select File upload tab if you want to upload a language from an archive (supported formats are ZIP, TAR, GZ, and TGZ), then specify local path to the language file
- Select Remote URL tab if you want to use a remote URL address, then specify remote path to the language file
- Select Local Path if you want to retrieve files from local directory, then specify local path to the language directory
When you have finished, press the Install button. An information window will be displayed.
The language is installed, and you are returned to the Language Manager page.
Drop-in copy
Extract the content of the language package, e.g. the it/ directory, directly into your root lang/ directory. The language will be immediately available and also listed in your administration backend. If you are not seeing the language, check that the webserver process has read permissions to the language directory.
Editing a language
If you are maintaining a language or if you want to easily fix a particular language, you can edit the language (eventually making some missing translations) by yourself.
Language resources marked as special should be modified only according to Special language resources.
Select the radiobutton next to the language you want to edit and press Edit button. The Edit Language page will be displayed allowing to select the file you want to edit.
The dropdown menu on the page lists all of the PHP language files that constitute edited language. Each PHP file has a number of language resources - terms that appear in the interface. The field next to the resource is the current translation of that resource for the language selected. You can edit a language by changing the values of these fields.
Make any changes to the translation, and click Save. The changes are saved, and you are returned to the Language Manager page. If you want to save part of your translation (so you won't lost it, if something goes wrong) and continue editing of other parts, press Save & edit again button.
Deleting a language
Although it is best to have more languages rather than few, there are situations when deleting a language is desirable - for instance you would not keep a language that is improperly translated, and has been replaced. When you no longer wish to use a particular language, you can delete it.
Select the radio button next to the language you want to delete and press Delete button. A prompt window will be displayed, asking if you want to proceed.
Click OK and the language is deleted, and the Language Manager page is updated.
Repairing a language
This action is only necessary if you are actively maintaining a translation.
During development of a new version of Lanius CMS language files of the main English language will change, thus language files of all other translations will need to mirror the changes.
Lanius CMS will locate where the translation is outdated and perform synchronization operations automatically. Select the radiobutton next to the language you want to repair and press Repair button. A page listing all of the fixes that were made (if any) will be displayed.
Click Back. The language is repaired, and you are returned to the Language Manager page.
Once you have repaired a language you should check it manually (by editing it) to translate new language resources.
Normalizing a language
Normalization should be used only in case of corrupt language files (for example, after manual editing files, which is not supported); you usually don't need to apply normalization, neither if you are actively maintaining it.
When a language is normalized, each language file is rewritten.
Select the radiobutton next to the language you want to normalize and press Normalize button. A prompt window will be displayed, warning you of the consequences of normalizing a language and asking if you still want to proceed.
When you press OK button, a new page will be displayed listing all files belonging to the normalized language.
Click Back. The language is normalized, and you are returned to the Language Manager page.
Verifying a language
Some language resources have special strings in them; if you have not preserved them during translation, the translation will crash the CMS at some point.
Verification process ensures that all language resources are correctly translated in respect of those special strings; if a language does not pass verification, it should never be published.
Select the radiobutton next to the language you want to verify and press Verify button. A page listing the number of language files belonging to the verified language will be displayed.
Click Back. The language is verified, and you are returned to the Language Manager page.



