Hi there.
Is there any way to translate forum to other languages? Lang files maybe?
- 0
Illuminate Your Community.
Hi there.
Is there any way to translate forum to other languages? Lang files maybe?
Hi lopar, welcome to Panther
Yes - although there is no documentation on this at the moment, it is very possible to add different languages. We actually plan to add as many languages in the core as possible. Here are the steps in creating a new language:
In the 'lang' folder, create a new sub directory with the language name you wish (in English). Example, French or German.
Now, copy all the files from the 'English' folder into the new folder you created.
Finally, open the files in a text editor, and you will find an array, with strings in like below:
'No plugins' => 'You must select at least one plugin to remove.',
Note: This was taken from lang/English/admin_addons.php
Translate the string on the right.
Save the file, and you should be able to select this from the admin options page, and in your profile.
Let me know if you'd like further assistance. I will be more than happy to help.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Can I use translations from FluxBB?
Universe is corrupt. Reboot: Y/N?
Yes - although some may very well be missing language indexes, and there are files that need to be added which weren't available in FluxBB. Let me know if you have any problems.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
First and simple language file import. Got this
Errno [ 8 ]: Array to string conversion in /users/cybermax/www/panther/profile.php on line 1787
Universe is corrupt. Reboot: Y/N?
Thanks. Looking into this now.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
What language pack did you import?
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Fixed. Changes committed to GitLab. See: https://gitlab.com/vank1ta/Panther/comm … 118ef00f54
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Thx, works - now I got this
Errno [ 2 ]: require(/users/cybermax/www/panther/lang/German/warnings.php) [<a href='http://de.php.net/function.require'>function.require</a>]: failed to open stream: No such file or directory in /users/cybermax/www/panther/profile.php on line 1627
Ok, create an empty file warnings.php. Got this
Errno [ 8 ]: Undefined variable: lang_warnings in /users/cybermax/www/panther/profile.php on line 1641
I know it's now my job to create and fill warnings.php but I think a fallback to english would be good idea, better a double fallback.
If a special language file doesn't exist english should be loaded per default, if a special string isn't available (cause the lang file needs a rework) only this english string will be shown instead.
It's not professional to see an error message or nothing .
In moment the only chance is to set the language completely back to english.
Universe is corrupt. Reboot: Y/N?
I completely understand what you're saying - however, generally, this should not happen because languages included by default in future versions will not have these errors. I think of it from more of a "developer" point of view; if you're developing a new language pack, you should really get these errors because it tells you where the problem is. If you just get an English language string, you'll have to traverse through the files to see where the problem is.
That said though, I do agree that we need an English language pack fall-back in case the default does not exist.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Yeah, it's really hard to "synchronize" all translators on open source projects .
I know I'm talking about - have worked for a lot of open source projects as translator ...
Or maybe there should a special developer / translator mode to see such errors?
Universe is corrupt. Reboot: Y/N?
That's not at all a bad idea.
There is currently an error suppression mode (i.e. deleting an avatar .etc in case it doesn't exist). Perhaps with a bit of enhancement, we could allow a constant to enable supressed errors being detected as normal errors.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
there are files that need to be added which weren't available in FluxBB.
I'm trying to do that - and have seen it on my "translation console": Some of your lang files are ANSI encoded, and some files are in UTF8.
Not sure it this will make trouble on any place ...
Universe is corrupt. Reboot: Y/N?
Thank you, will take a look at this. They should all be UTF8.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Can't find any language files from 1.0.8 with ANSI encoding. Was this a fresh install of 1.0.9 you tried?
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
No, was 1.0.8
Will check it again...
Universe is corrupt. Reboot: Y/N?
Have located a lot of redundancies (I'm currently at admin_options.php) - for example
'Too large ini' => 'The selected file was too large to upload. The server didn\'t allow the upload.',
'Partial upload' => 'The uploaded file only partially uploaded. Please attempt to upload the file again.',
'No tmp directory' => 'The server was unable to upload the file to a temporary directory.',
'No file' => 'You did not select a file to be uploaded.',
'Bad type' => 'You are not allowed to upload this type of file. Please upload an icon file (.ico).',
'Options updated redirect' => 'Options updated. Redirecting …',
'Options head' => 'Options',
'Too large' => 'The file you tried to upload is larger than the maximum allowed %s bytes.',
'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed %sx%s pixels.',
They are only examples. There are some more . And they are available in more than one lang file ... think they should be in /lang/common.php
Universe is corrupt. Reboot: Y/N?
Good idea! Do you know exactly which files they are in? Created a ticket: https://www.get-aura.org/support/ticket.php?id=73
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
There are 47 lang files - AFTER translation most of them it's a little bit difficult to say where I've read the redundancies.
The posted snippet is for example inside admin_addons.php, admin_options.php and admin_smilies.php.
But think there are some more ...
I know - performance rulez - but sometimes I have the feeling core lang files should be grouped and reduced/merged. After alphabetical ordering it's a lot easier to find redundancies ...
Universe is corrupt. Reboot: Y/N?
You're right - it's pointless having the same language strings in the different files.
I'm currently working on the template system and implementing Twig, so to make sure this is not forgotten can you add a ticket please?
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Ahh, ok, Twig is your favourite ... maybe it could be merged by default with Twital
https://github.com/goetas/twital
Yes, will create a ticket ...
Universe is corrupt. Reboot: Y/N?
I'll see how this goes for the moment. I admit the syntax is much easier in Twital, but Twig is already ~900 KB in size, and without any plugins. My main concern is the file size.
Kind regards,
Christopher Marshall
chris [at] get-aura [dot] org
Project Manager
Yeah - easier syntax was the reason for suggesting Twital .
And yes, Twig is a full size framework.
That was the reason I suggest Fat Free (Micro) Framework in the past - has only 89 kB . Maybe the better/best solution for a Fat Free Forum
.
Universe is corrupt. Reboot: Y/N?
As I said I'm on translating - a quote:
'Show queries help' => 'This option will add query information to the bottom of every page. <strong>Note:</strong> This will display all the queries for that page to all users. It is strongly recommended this be turned off when finished debugging.',
But I'm seeing this information at the bottom . Are you on debugging your site
? Or have you forgotten your own recommendation
?
Universe is corrupt. Reboot: Y/N?
Users in this topic: 0 guests, 0 registered users