1 (edited by PunBB 2017.10.08 00:02)

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',
Если вам долго не отвечают, пишите автору темы в личку или на Email.

2

Re: How to translate PunBB forum into other languages (Left-To-Right)

How can I use the plugin Pan_Translator for translation in a new language ? I thought it would create the files ready for the new language and I will be able to translate directly in the administration area.

3 (edited by PunBB 2017.10.08 16:53)

Re: How to translate PunBB forum into other languages (Left-To-Right)

This extension needs to be improved. I wanted to connect Google Translation to it so that it would be translated into the input field.
That is, the script automatically translates.

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

4

Re: How to translate PunBB forum into other languages (Left-To-Right)

It should be difficult to connect google translate in the administration area : when the page is not public, Google Translate does not translate, since it has no access. To my knowledge, it is impossible to use Google Translate in pages protected by password, htaccess, an intranet, pages reserved to certain members and so on ...
If you know a way to bypass this restriction, I am interested.