Translating Sendroid Ultimate

What would you like to know?


Translating Sendroid Ultimate

One of the unique features on Sendroid Ultimate is the ability to easily translate it to other language.

The language system in Sendroid Ultimate allows you to create your own additional language translations called "Language Packs'. We recommend starting by duplicating one of the existing system language files.

The Sendroid Ultimate language file is simply a PHP file containing an array, having language key name as the array key and the language words and phrases as the array value.

Sendroid Ultimate language files are all located in /system/lang/ directory.

Translating Sendroid Ultimate can be done in either of these two ways;

- Adding a Language File manually to the language folder and database

- Creating an Installable Language Pack

Adding a Language File manually to the language folder and database

  1. Begin by opening an existing language file, for example system/lang/en.php
  2. Save this file with a new name. The name you choose must be unique and can only contain letters and numbers.
  3. Translate the words and phrases contained within it into your new language. Be careful not to change the language key names, only the words and phrases contained within the single quotes on each line. (see example language code below)
$LANG = array(
	'Language Key' => 'Translated Phrase',
	);

Be careful not to delete any of the quotation marks (') around the text strings or the commas on the ends of each line (,). Also should 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.

  1. Upload your new language file to your Sendroid Ultimate installations /system/lang/ directory.
  2. Create a new row in the language table of your Sendroid Ultimate database using the following;

INSERT INTO `language` (`id`, `alias`, `title`, `enabled`) VALUES (NULL, 'file_name', 'Language Name', '1');

In the above SQL query, you need to replace file_name with the actual file name of the language file you created without the ".php" (eg, use gh if your language file is named gh.php)

Also replace the Language Name with the actual language name (eg. French, Chinese, Italian, etc)

Now the new language will be available for use. Test it by visiting your Sendroid Ultimate installation and selecting the new language from the language drop-down. If you encounter any errors, this suggests your changes to the language file have introduced a syntax error. Please double check your modifications and try again.

 

Creating an Installable Language Pack

Creating an installable language pack makes it possible for you to offer your new language as an installable module to Sendroid Ultimate users. This will also offer the flexibility to easily enable or disable the language at any time without manually making changes to the database.

Please note that this method may require some level of PHP, XML and SQL knowledge. Also refer to Getting Started with Sendroid Ultimate Module Development to understand how Sendroid Ultimate modules are structured.

A standard Sendroid Ultimate module consists of the following files, all in a compressed zip file.

- Manifest.txt (The main module manifest file containing module information)

- index.php (This is your main language file contain your translations)

Click here to download a sample language file

Now lets create the main language file

  1. Begin by opening an existing language file, for example system/lang/en.php
  2. Save this as index.php. This will be used as your main language file for the language pack.
  3. Translate the words and phrases contained within it into your new language. Be careful not to change the language key names, only the words and phrases contained within the single quotes on each line. (see example language code below)
$LANG = array(
	'Language Key' => 'Translated Phrase',
	);

Be careful not to delete any of the quotation marks (') around the text strings or the commas on the ends of each line (,). Also should 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.

Next, create the Module Manifest file.

  1. Create a new txt file with name Manifest.txt
  2. Insert the following codes in the manifest file
    <module>
      <name>Language Name</name>
      <author>Author's Name</author>
      <type>language</type>
      <privileges>1,2</privileges>
      <version>1.0.0</version>
    </module>
      

    In the above code, you need to replace Language Name with the actual language name (eg. French, Chinese, Italian, etc)

    Also replace the Author's Name with the your name or developers name as the case may be.

  3. Save the your changes and your Manifest.txt file is ready
  4. Now all that is left to do is Zip Manifest.txt and index.php files and you will have an installable Sendroid Ultimate language pack.

Click here to download a sample language file

Ynet Interactive Ltd. is a Nigeria based Information Technology solutions outfit. We focus on delivering high-performance and scalable web, software & ICT products and solutions to different industries. We have experience of developing and maintaining successful software products, mobile applications, eCommerce portals, marketplaces, social networks, real-time business analytics and composite sync and integrations.

Visit Website