|
-
Apr 15th, 2007, 04:11 AM
#5
Re: Best way to store/retrieve text values for multilingual sites
The way I use on a large, multi-lingual project is a rather complex system.
1) There are templates that define the structure of the pages.
2) A new page is created by choosing a template and filling in the content.
3) The CMS then generates a .php file from the template by filling in the content. This process is called publishing.
4) In addition to the content of the page itself, navigation menus etc. are generated from the various pages in the system.
5) To get the page in another language, you must of course translate the content. You create a new page for this translated version, but you link it to the other one, saying that it's an alternate language version.
6) Very little text remains that is part of the template. The language-specific version of this text is chosen at runtime from resource files (very simple name-value pair files, or even CDB files).
7) If a user requests a resource in a language that doesn't exist, he gets an error page listing the languages that are available.
Don't fool yourself. Multiple languages are always hard to maintain; effort always scales linearly to the number of languages. Using a template system like I do minimizes the effort for structural changes, but in the long run, this effort is minimal compared to the effort of maintaining the content, and unless you find the output of machine translators acceptable, this always means writing the content once for each and every language you support.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|