![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||
|
The following are few ideas for storing text for a multilingual site.
a. One version of the site for each language. (not scaleable. hard to maintain.) b. All text values in language tables in database (many database hits will slow things down) c. All text values into arrays in seperate files. Include file according to language and get value from array. (hard to maintain....but works pretty well-this is what I'm doing now.) d. Create xml file. Each node is value key, and value in each language. Use some php function to read value according to language from xml file. I'm pretty much like the last one (xml file) as this will be the closest I can get to resource files in asp.net (one of the few things that's really cool about asp.net). But I'm not sure what is the fastest, easiest best way to find specific values in xml files using php. Had a quick look at some sample code, and seems mostly one will loop through nodes? Is there some code that one can create to easily and quicly retrieve node values? Other suggestions are welcome.
__________________
|
|
|
|
||
|
#2
|
||
|
On multi language sites I have always used what I think is #3.
I'd have a en.lang.php that would contain for example: PHP Code:
PHP Code:
|
|
|
|
||
|
#3
|
||
|
That was informative. I wonder when i will really master php.
__________________
Hacks | Tech Tips |
|
|
|
||
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 12 Essential Web Site Design Tips | admans | Website Design Forum | 6 | 03-26-2008 13:29 |
| Selling Text Links - Real Estate Related Sites | bentong | Other Offers and Requests | 1 | 01-07-2006 00:18 |
| Selling Text Links on 2 PR4 and 3 PR3 site.[Package Deal Available]. | admans | Text Link and Banner Spot Sales | 0 | 10-20-2005 19:37 |