Support > International Support

READ ME: About SimplePortal Translation.

(1/1)

130860:
Hi there, this post will help you translate SimplePortal into your language.

There are three language files that can be found in the "languages" folder of the SimplePortal package:

* SPortal.english.php
This file contains some general language strings, the error strings and any block strings. These strings can appear anywhere.


* SPortalAdmin.english.php
This file contains all the admin strings, including the strings for the block settings, article settings, block descriptions, block parameters, etc.


* SPortalHelp.english.php
This file contains the necessary help language strings.These help strings give the user important information about every aspect of SimplePortal's settings and configuration.

So, how do I translate SimplePortal?

If you want to translate SimplePortal, then you just have to translate the language strings in each of those files, here's an example:


--- Code: ---$txt['var'] = 'Translate Me!';
--- End code ---
 
You have to translate the value of the string, that means, all the content within simple quotes '  Translate Me!  '

The strings in each file are separated according to the location where the string is displayed.

UTF-8

Most of the languages currently supported by smf have their own utf8 versions, these files need to be encoded with "UTF-8 witout BOM", with this encoding they can contain special utf8 characters (such as á) instead of HTML entities, very useful with some languages. Each SMF and SimplePortal translation file has its own utf8 version, these files need to be encoded with "UTF-8 witout BOM", to convert a normal file to utf8 you have to encode the utf8 file with "utf-8 witout BOM", this is easily done with a source code editor, for example, with notepad++ go to Format, select "convert to utf8 witout BOM", save the file and you're done. You can then use special utf8 characters in this file, for example you can put á instead of the HTML entity á Also note that you can easily convert from HTML entities to special characters using a code editor with a find and replace feature 

If you have more questions regarding encoding, please contact the language team.

Tools

While working on the translation, we recommend the using of a source code editor, such as notepad++, EditPlus 3, etc. Using a source code editor will help you to easily find the strings that need to be translated. They also have some very useful utilities that can help you to save time and translate faster without losing quality.

Notes

If you are planning to use single quotes inside the value of a string, you have to escape them using a backslash \' for example:


--- Code: ---$txt['var'] = 'I'm going to your house.';
--- End code ---

should be like this:


--- Code: ---$txt['var'] = 'I\'m going to your house.';
--- End code ---

This is necessary to avoid php errors.

Some strings also have variables inside them:


--- Code: ---  $txt['var'] = 'Viewing the <a href="' . $scripturl . '">Portal</a>.';
--- End code ---

In this case the variable is inside quotes:

$txt['var'] = 'translate me' . $do_not_touch_me . ' again translate me';   

There's no need to translate the variable, in fact, you shouldn't do that, just the text within the single quotes. You shouldn't translate the html either (the text in-between the < and > symbols).

I'm done with the translation, what's next?

If you have already made a translation for SimplePortal or you are interested in translating SimplePortal for your language, please contact the Language coordinator or create a new topic in the International Support board.

Navigation

[0] Message Index

Go to full version