Elxis CMS Forum

Support => Elxis 4.x/5.x DEV => Topic started by: hakangur on November 21, 2012, 15:36:37

Title: Turkish language
Post by: hakangur on November 21, 2012, 15:36:37
I could have posted this message under "Language" sub-topic but I noticed that discussion there is related with earlier versions.

I attach Turkish language files for Elxis Nautilus 4.0. Each one of 31 language files has been translated from English into Turkish, ready with UTF-8 coding. As stated elsewhere in this Forum, there is a mismatch between PHP Version 5.2.x and the Turkish language. Therefore, it is essential that the language array line in file tr.php is kept as it is. If you make any changes there (such as replacing "en_GB" with "tr_TR") you will have blank pages - or, at least, this is what I experienced initially.

Title: Re: Turkish language
Post by: datahell on November 21, 2012, 19:01:33
Your files are encoded wrong as ANSI.
Please encode them as UTF-8 and re-attach the package.

Unfortunately I see that php has issues with the turkish language even on php 5.4!
There is a bug (https://bugs.php.net/bug.php?id=18556) which hasn't been solved for 10 years! Incredible, I haven't seen that again!

If we consider that the problem will finally e fixed in php 6 we can add something like that in tr.php

Code: [Select]
if (version_compare(phpversion(), '6.0', '>=')) {
  $locale = array('tr_TR.utf8', 'tr_TR.UTF-8', 'en_GB.utf8', 'en_GB.UTF-8', 'en');
} else {
$locale = array('en_GB.utf8', 'en_GB.UTF-8', 'en', 'english');
}
Title: Re: Turkish language
Post by: hakangur on December 10, 2012, 10:44:55
Sorry for replying so late, datahell. I have had some health problems lately.

Upon receiving the warning message above, I checked the files by using PSPad Editor and corrected the coding.
Title: Re: Turkish language
Post by: datahell on December 10, 2012, 20:36:12
I downloaded the file and I am going to check it right now.
Thank you very much!
I wish you the best for your health, this is the most important of all things.
Title: Turkish translation saved as ANSI
Post by: datahell on December 10, 2012, 20:45:33
I just checked.
Unfortunately the language files are saved as ANSI and not as UTF-8.
They can not be used as they are.
See the attached screenshot to understand how everybody else, excepts those having a turkish keyboard, sees them.

Do this. Use pspad (http://www.pspad.com/) (or other utf-8 capable text editor).
Open each file with pspad and change encoding to UTF-8 (see second attached image).
Save the files.
Re-pack and re-attach them here.

After saving as UTF-8 everyone, even those not having a turkish keyboard, will see them fine, not corrupted as they look like now.