Jump to content
TNG Community
Nestorph

Adding languages

Recommended Posts

Nestorph

What's the process for adding new languages?  I'd like to add Ukrainian to the list of options.

Share this post


Link to post
Share on other sites
bhemph

Do you know Ukrainian to be able to translate the text strings from the files in the English languages folder into Ukrainian?  If so, then you would need to work on that and communicate with Darrin to add the new language to the distribution.  If not, then the first step would be finding someone who could help with the translations.

Share this post


Link to post
Share on other sites
Nestorph

I do speak, read, and write Ukrainian (first language).  I think I'm beginning to understand the scope of what I asking for!  Not trivial...  Thanks

Share this post


Link to post
Share on other sites
bhemph

Ok, yes that does help.  Yes, not trivial but start by creating a folder Ukrainian-UTF8 and copy admintext.php, alltext.php, cust_text.php, data_protection_policy.php, and text.php into the folder.  That gives you the minimal base files for translation that are used by the dynamic language switching.  I think the help files are being changed to not being translated now and letting Google do it.  Nothing needs to be translated in cust_text.php and the mods all look for the English text.  The smallest file to start with would be alltext.php and that text is used on both the admin side and the public side.

$dates['JAN'] = "Jan";
$dates['JANUARY'] = "January";

So you would start with changing "Jan" to the shortened version of the month and "January" to the full month name.  It is only the part after the = that you change and you would not translate any of the commented lines either.  At least starting with the first section being the dates, it would make sense how the changes are working to be seen quickly in setting the new language up and seeing results.  After alltext.php, text.php is the next file to do since that is text strings for the public facing side of the site.  Then the admintext.php would be next with the text strings for the admin side of the site.  If there are things that seem like it is two strings with the same word in English, you may have to check what that is in other languages, since German, Spanish, Portuguese, etc. may have an example showing that the two are masculine/feminine versions of the word or some other usage that does not exist in English but does in different languages.  There may be some spots that are not ideal language construction for sentences with the base structure being in English and that not being exactly the proper sentence structure for other languages.

It is a slow iterative process, but there are some language files out there that still have some untranslated English strings in them.  Starting with the alltext and common sections at the bottom of admintext.php and text.php will seem to have the most bang for the time spent since they are used on multiple pages within TNG.  Then moving on to the sections that apply to specific pages where you can feel like you have finished all the translation for a page will help to make it not feel quite as overwhelming or daunting of a task.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×