Support => International Support => Topic started by: 130860 on February 06, 2010, 08:00:41 PM

Title: READ ME: About SimplePortal Translation.
Post by: 130860 on February 06, 2010, 08:00:41 PM
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:

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: [Select]
$txt['var'] = 'Translate Me!';  
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.


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.


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.


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: [Select]
$txt['var'] = 'I'm going to your house.';
should be like this:

Code: [Select]
$txt['var'] = 'I\'m going to your house.';
This is necessary to avoid php errors.

Some strings also have variables inside them:

Code: [Select]
  $txt['var'] = 'Viewing the <a href="' . $scripturl . '">Portal</a>.';
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.
SimplePortal 2.3.7 © 2008-2021, SimplePortal