Reply to Re: Best way for multiple language support for a website

Your name:

Reply:


Posted by Juliette on 10/10/36 11:45

Neeper wrote:
> What collation character set would I use in mySQL to store japanese
> and korean?

UTF8 should be fine. You will need MySQL v 4.1 or higher to use utf8.

>
>
> The reason I asked about the array was because I read this post:
> http://groups.google.com/group/php.general/browse_thread/thread/2343af9c19078987/82aa005e9fef58a1?lnk=st&q=php+multiple+languages&rnum=1&hl=en#82aa005e9fef58a1
> And you are right, the array naming scheme is tough to remember.
>
> So if I use the text file, would I load the translations into a string
> variable or constants using PHP define statements?
>
> Thanks for your advice! :-)
>
>
>
>
>
>
> On Sat, 15 Apr 2006 23:42:01 +0200, "J.O. Aho" <user@example.net>
> wrote:
>
>> Neeper wrote:
>>> My website has about 20 pages that are all currentyl in English. I
>>> want to be able to add support for Japanese. I've researched around
>>> and not sure what is the best way in terms of using a database table,
>>> flat file or arrays for storing the different language translations.
>>> I've experimented with mysql to store the language translations but
>>> had problems retrieving the utf8 stored data.
>> You sure you have had the mysql to store the data in utf-8? If not, then
>> retrieving the data won't work well.
>>
>>
>>> And then I saw an
>>> article saying using arrays in seperate files is better in terms of
>>> performance... What is the best way to do this?
>> Looking on most of the already written php-portals, they all seem to use files
>> to handle translations. Not in arrays, but in variables and storing one
>> language per file and depending on which language to use, you load that file.
>> This system, with variables, makes it a lot easier to see the translations for
>> a language and adding support for a new language is a lot easier than with
>> arrays, as you don't have the risk of mixing the order languages are supposed
>> to come in the array.
>>
>> Using a sql server will create unnecessary overheads, and would slow things a
>> lot if the web-server and sql-server are located on different machines. For
>> memory usage you can win to use the sql-server method, as you will then only
>> get the translations you need loaded (if you construct a proper SELECT query),
>> while loading a include file with all the translations will use up more memory
>> and even more if you happen to use the array method. You can of course chop
>> the translation files into smaller ones, but that makes a lot extra work as
>> you will have to keep track of which translations are in which file.
>>
>>
>> //Aho
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация