Re: internationalizing php applications

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrés

The applications I've worked with (not many!) have, I think, just an  
additional field for language_id and just duplicate entries to the  
same tables. However:: there are two (or more) distinct layers to  
deal with, content, infrastructure and administration. OSCommerce,  
for example, the package that I work with uses English for Admin,  
then several languages for the rest. Those other sections deal with  
the issue in different ways, the infrastructure part using a template  
system where each page has tokens for tags and the tokens are filled  
in with a constants page setup for each page, for each language.

eg: home page has front and center <? echo TEXT_MAIN; ?> and is  
assembled using includes keyed to a language preference.
Then in /includes/languages/en/home there is the define(TEXT_MAIN,  
'Hi there and welcome to my catalog etc etc.');
while /includes/languages/de/home there is the define(TEXT_MAIN,  
'Hallo dort und Willkommen zu meinem Katalog usw. usw..');
or  /includes/languages/chinese/home there is the define(TEXT_MAIN,  
'喂那里和欢迎到我的目录等等。');

The main problem with the system is that the content items won't  
often be translated to anything since it must be done manually by the  
client, so if you view the store in an alternate language the  
infrastructure may be intact but the content (items for sale,  
descriptions and whatever) are all blank. Not good. One option I  
considered was automatically filling in alternate language blocks  
with existing english text, but 1. it never happened and 2. that left  
the other issue, that admin pages, already cumbersome in a single  
language, get really bad when you have even only two or three entry  
items for each field. The other issues include risks shipping  
overseas (or more to the point, risks in collecting debts overseas)  
so ultimately internationalization was downplayed and alternate  
versions were simply turned off or removed.

 From the point of view of the functional netizen I believe myself to  
be, I'd suggest the model of translating infrastructure and let  
content fall as it may. In researching technical issues for instance  
I will often google an error message (in linux english I guess) and  
find answers in many alphabets. Often I'll track down my answer in a  
page of cyrillic text where I understand absolutely nothing but the  
code snips. Other times I can struggle through rough translations of  
some similar (or romance or germanic) languages. Sometimes I'll need  
to consult some translation service - but to employ such on every hit  
to every page would be incredibly tedious for getting through a site,  
particularly if it were automated I should think. Granted, ten or  
twenty years from now that notion would appear really provincial, but  
I deal with real issues today I think.

Anyhow, mikie's (that's me ;) first rule of Internet is, just cuz you  
can doesn't mean you want to, or can afford to. Design the idea, then  
the application, then the code. Good luck! :)

-m


On Mar 3, 2006, at 5:04 PM, Andres Santos wrote:

> hi.
>
> i'm developing a cms... and know i am in the need of
> internationalizing the content... which means, to give the user the
> power to translate the same content to some languages.
>
> right now i have some mysql tables, for example: section, content,  
> modules, news
> each table has its own title and description fields...  but if i want
> to add "n" languages, for example: spanish, italian, german... i will
> need to have the DATA in some other place.
>
> a friend told me to use the data in separate tables, for example:
>
> table: section
> fields: section_id, section_id_parent, order
>
> table: section_content
> fields: section_content_id, language_id, section_id, title,  
> description
>
> ... of course i would have to do that with EACH tabla... content,
> modules, news.. etc... and if i have to add some other personalized
> plugin, i should also create more tables.
>
> so... what's the best options around? do you have any other ideas?
> thanks, andres
>
>
>
> --
> Slds,
> Andrés Santos, IIG
>
> *****************************


PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux