OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Please help. Problem regarding non-english (Thai) locale

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Please help. Problem regarding non-english (Thai) locale

Postby khun_panya » Sat Feb 18, 2006 1:20 am

Hi,
I installed OJS 2 and had configured it to run correctly.
I then want to create another locale by copy directories
$OJS/locale/en_US to th_TH
$OJS/dbscripts/xml/data/locale/en_US to th_TH
$OJS/help/en_US to th_TH
$OJS/rt/en_US to th_TH
and then edit file $OJS/registry/locales.xml as follow
Code: Select all
<locales>
   <locale key="en_US" name="English"/>
   <locale key="th_TH" name="Thai"/>
</locales>


I can successfully install my newly locale
in Language administration page.
The language option appears correctly in OJS page.
And I can change between EN and TH now.

The only thing I'd left is to translate content in
$OJS/locale/th_TH/locale.xml to Thai language.
But this is where the problem begins.

When I change one word, only one word
from English to Thai, say
Code: Select all
.......
  'navigation.home' => 'Home',
  'navigation.about' => 'About',
  'navigation.userHome' => 'User Home',
.......

to
Code: Select all
.......
  'navigation.home' => 'หน้าหลัก',
  'navigation.about' => 'About',
  'navigation.userHome' => 'User Home',
.......

And do refresh OJS page.

Every words in OJS page then gone.
The place where it should to render the
HOME or ABOUT text is showing
##navigation.home## and ##navigation.about## instead.

I've noticed that the file $OJS/locale/cache/th_TH.inc.php
has not been generated correctly. It seems like XML parser
could not understand Thai characters. Every word constants
in the cache file after Thai characters were disappeared.

I've also tried to change encoding of $OJS/locale/th_TH/locale.xml from
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

to
Code: Select all
<?xml version="1.0" encoding="TIS-620"?>

But no luck.

Am I missing something?
Please help.

Panya Thanyaprasertkul.
khun_panya
 
Posts: 7
Joined: Sat Feb 18, 2006 12:36 am

Postby asmecher » Sun Feb 19, 2006 10:19 pm

Hi khun_panya,

When you quote changes you've made to the code, it looks like you're changing the automatically-generated PHP file even though you're talking about the XML file. I think this is probably a misunderstanding on my part, but are you sure you're changing the right file?

Two things to check regarding your changes to the locale file:
  • Are you using a UTF-8 capable text editor in UTF-8 mode?
  • Have you tried validating the XML file after your changes? A good validator should report character set problems if there are any.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8844
Joined: Wed Aug 10, 2005 12:56 pm

Postby khun_panya » Mon Feb 20, 2006 1:53 am

Opps. You're right. I did post the wrong file.
Actually I try to change both the XML and php generated file.
So it make me confuse.

But hey! You're right again.
After re-save XML as UTF8 text file.
It then works sweetly. :D
Thanks!.
khun_panya
 
Posts: 7
Joined: Sat Feb 18, 2006 12:36 am

Postby khun_panya » Sat Feb 25, 2006 1:22 am

Just one other thing.
On the page like article or people list
where it will show A-Z alphabetical index for name.
Any (easy) chance to localize these alphabets?
Or if it is need to manually modify in PHP code.
Which file is it.

Thanks.
khun_panya
 
Posts: 7
Joined: Sat Feb 18, 2006 12:36 am

Postby asmecher » Sat Feb 25, 2006 1:50 am

Hi khun_panya,

Alphabetization happens on the database level using the standard SQL "ORDER BY" clause; you'll have to look at your database configuration and character set. OJS configures the connection character set for the database using settings in config.inc.php.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8844
Joined: Wed Aug 10, 2005 12:56 pm

SQL Collation

Postby ramon » Wed May 10, 2006 11:29 am

Alec,

Not sure if this question fits this post.
It's more a general database question, that implies an answer for more than OJS use...

Can you explain to me what is COLLATION, for the database? What's the purpose exactly? I've tried to learn by myself, only to get confused, as I am no DBDesigner or DBA.

Which should be used for Latin languages, such as Spanish and Portuguese that have accented characters, but should be listed in the same letter?

Unicode uses 2bite descriptions for special characters that prevent us from listing A, Á, À, Ã, Â in A, for example.

In our Journal Listing we had to add a Letter field in the database so we could list the journals by that letter, instead of the first letter of the journal (also because many titles begin with Journal)

Any ideas??
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Postby khun_panya » Sat May 20, 2006 9:53 am

I want to customize these index charactors because
I'll use OJS for both Thai and English language papers.
Beside A-Z list I still need the index charactors
in my own language for authors' name which
are spelled in Thai. Thai alphabets are located
somewhere around 0E00 – 0E7F in unicode.
And I want to put them right after A-Z.

Currently I have found that A-Z list is printed
by Smarty template. And am trying to modify
this TPL. But I've ruined it up :-P
as I'm calling for some help in here
http://pkp.sfu.ca/support/forum/viewtopic.php?t=937
khun_panya
 
Posts: 7
Joined: Sat Feb 18, 2006 12:36 am

Postby asmecher » Mon May 22, 2006 11:14 pm

Hi khun_panya,

This is something we've at least partially addressed in the upcoming release of OJS 2.1.1 (expected in June); now there's a localization string that lists all the letters to be included in the alpha list.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8844
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 5 guests