Topic: How to translate PunBB forum into other languages (Left-To-Right)
The main language of the PunBB forum is English. Perhaps you ask: "Can I translate the forum into my native language?". Answer - Yes! It's simple. Forum in your native language will help users to better navigate the settings.
To translate the PunBB forum into your language, you will need knowledge of English or you can use Google Translition. Perhaps in the second case you will translate with errors, but in any case it's better than not having anything. So, let's go!
Instruction for translating European languages (Left-To-Right)
1. First download the PunBB 1.4.4 forum archive and unpack it to your server.
2. Create a database and install the forum. Enter the forum as an administrator.
3. 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/Romanian.
4. Now, select in your profile a new language - Romanian. 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.
5. 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?
6. For example, open the file index.php:
<?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',
then replace the values in the second column.
<?php
// Language definitions used in index.php
$lang_index = array(
'Moderated by' => 'Moderată de %s',
'Link to' => 'Conectați-vă la %s', // As in "Link to http://punbb.informer.com/"
'Category subtitle' => '%1$s în această categorie cu detalii despre %2$s',
'Forums' => 'Forum',
'Topics' => 'Subiecte',
'Posts' => 'Mesaje',
'Last post' => 'Ultima postare:',
'last post' => 'ultima postare',
'topics' => 'subiecte',
'topic' => 'subiect',
'post' => 'post',
'posts' => 'posturi',
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
'lang_direction' => 'rtl', // ltr (Left-To-Right) or rtl (Right-To-Left)
'lang_identifier' => 'ro',
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',