1 (edited by PunBB 2017.10.08 01:00)

Topic: How to translate forum PunBB standard of RTL (Right to Left)

Supporting Right-to-Left Languages

Your user interface should be mirrored when displaying right-to-left languages. If you use base internationalization and Auto Layout, most of the user interface will appear mirrored automatically for you. The text direction changes to right-to-left, with the exception of phone numbers and country codes which are always left-to-right. Some views and controls in your user interface may not change direction automatically; when appropriate, you can fix this programmatically.

1. After installation forum of PunBB upload style Oxygen_Right_To_Left.

2. Originally, the forum already has a folder with English files. Now you need to follow the path: you-forum.com/lang/ and create a copy of the English folder. For example: you-forum.com/lang/Farsi.

3. Now, select in your profile a new language - Farsi. With any changes, you will see all the results if you are authorized. For guests and users, the default language can be selected in the basic settings.

4. It's best to start translating from the main files where you could track the changes. (index.php, login.php, forum.php, topic.php, profile.php ...)

How to translate files?

5. For example, open the file index.php:


// Language definitions used in index.php
$lang_index = array(

'Moderated by'            =>   'Moderated by %s',
'Link to'               =>   'Link to %s',   // As in "Link to http://punbb.informer.com/"
'Category subtitle'         =>   '%1$s in this category with details of %2$s',
'Forums'               =>   'Forums',
'Topics'               =>   'Topics',
'Posts'                  =>   'Posts',
'Last post'               =>   'Last post:',
'last post'               =>   'last post',
'topics'               =>   'topics',
'topic'                  =>   'topic',
'post'                  =>   'post',
'posts'                  =>   'posts',
'No topic info'            =>   'No topic information',

then replace the values in the second column.


// Language definitions used in index.php
$lang_index = array(

'Moderated by'            =>   'مدیریت توسط %s',
'Link to'               =>   'لینک به %s',   // As in "Link to http://punbb.informer.com/"
'Category subtitle'         =>   '%1$s در این مجموعه با جزئیات %2$s',
'Forums'               =>   'انجمن',
'Topics'               =>   'موضوع',
'Posts'                  =>   'ارسال',
'Last post'               =>   'آخرین ارسال:',
'last post'               =>   'آخرین ارسال',
'topics'               =>   'موضوع',
'topic'                  =>   'موضوع',
'post'                  =>   'ارسال',
'posts'                  =>   'ارسال',
'No topic info'            =>   'اطلاعات موضوع وجود ندا

and so on until the very end of the file.

When you translate the file commo.php, then set a short language index or localization. And set ltr (Left-To-Right) or rtl (Right-To-Left)
See more lang codes https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

// Text orientation and encoding
'lang_direction'         =>   'rtl',   // ltr (Left-To-Right) or rtl (Right-To-Left)
'lang_identifier'         =>   'fa',

Be careful, if you use quotes, you always need to put a backslash in front of them. For example:

'Change user e-mail'      =>   'Change %s\'s email address',

You can also choose the language in the main settings for which you are translating the forum. Then you can track the changes in another browser as a guest.

Если вам долго не отвечают, пишите автору темы в личку или на Email.