Adding a Language

In WHASOLS, the language system facilitates you to create your own additional language translations.

We recommend initiating by duplicating one of the existing language files.

Language file names should be consist of a single word, containing of only lowercase letters and numbers. And the file must be ended with the extension .php.
  1. Begin by opening an existing language file, for example language/english.php

  2. Save this file with a new name and the name you select will be shown in the language selection dropdown menu inside the WHASOLS.

  3. The words and phrases contained within it, translate them into your new language. Be cautious not to change the language key names, the words and phrases only, contained within the double quotes on each line.

    Be careful not to delete any of the quotation marks (“) around the text strings or the semi-colons on the ends of each line (;). Also if you want to use a quote character (”) within your translated text, you must escape it - for example: \” The language files are written in PHP syntax so valid PHP code must be maintained.
  4. Upload your new language file to your WHASOLS installations /language/ directory.

  5. The language file will now be available for further use. Test it or proceed by visiting your WHASOLS installation client area 1st and then selecting the language file from the dropdown. If you face with any errors, this suggests your changes to the language file have introduced a syntax error. Please do double check your modifications and try again.

Locales

Locales define the language and region for a language file.

Each language file in WHASOLS needs a locale to be defined in the following format:

$_LANG['locale'] = "en_GB";

The above defines that the language is English (en), and the region is Great Britain (GB).

The locale information is used by WHASOLS to localise and exhibit the language name localised to the native language within the WHASOLS client area.

Failure or inability to provide a valid locale will prevent or stop the language file from showing up as available for use within WHASOLS.


Encoding

In WHASOLS, language files use UTF-8 encoding without a Byte Order Marker character which is by default.

When modifying language files it is essential to maintain the same encoding.

If you have chosen to change the system charset to something other than UTF-8 (for example iso-8859-1) then the language files will requires to be re-saved with ANSI encoding (also without a Byte Order Marker). Most text editors have this option (including Notepad) to be used.