Multilanguage WebSite

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Fabian
Forum Newbie
Posts: 10
Joined: Tue Aug 10, 2010 8:19 am

Multilanguage WebSite

Post by Fabian »

Hi guys,

i'm actually working on a multilanguage website and while i was thinking of it i came to a problem....

it's better create a single xml file containing all the phrase in the website per language or create a xml file for every page and put in there all the language sentences i use?

i obviously need the fastest solution.

thank you in advance for the help.


Fabian
User avatar
MindOverBody
Forum Commoner
Posts: 96
Joined: Fri Aug 06, 2010 9:01 pm
Location: Osijek, Croatia

Re: Multilanguage WebSite

Post by MindOverBody »

Fastest solution is to write single file, so you need just to include only that file.
Maybe the most practical solution is to write a language file for every tpl file if you are using template engine.
Fabian
Forum Newbie
Posts: 10
Joined: Tue Aug 10, 2010 8:19 am

Re: Multilanguage WebSite

Post by Fabian »

i'm using actually a self written template engine, so you think it's better single file language for every tpl
User avatar
MindOverBody
Forum Commoner
Posts: 96
Joined: Fri Aug 06, 2010 9:01 pm
Location: Osijek, Croatia

Re: Multilanguage WebSite

Post by MindOverBody »

you might upgrade your template engine to automatily load language file when processing certain tpl file. This type of solution will take more space, and time, but i think it is more organized. Duno, one way or another, result is the same. Doing language file for every tpl file is maybe little more elegant.
Fabian
Forum Newbie
Posts: 10
Joined: Tue Aug 10, 2010 8:19 am

Re: Multilanguage WebSite

Post by Fabian »

ok thank you for your help ^^

i'll do this way

Fabian
Post Reply