Page 1 of 1

Multi-language website

Posted: Sat Feb 02, 2008 4:06 pm
by phorc
hi,

what would be the best solution? i couldn't really find any useful information on the web. so, i figured i'd ask u people.

like, i have somewhere around 200 files, and id need them all translated. now theyre just in english, but id also like to have em in german.

problem is tho, i dun know how to do it, without messin up my server perfomance.

i know, there is MySQL, but i dun really wanna screw with the databank, cause if im puttin all that text into my databank, im sure it will explode.

so, i think a text-file-storage, would be the best thing to do. but, if im using only one language file, like for example languages/en/index.php that file might reach up to 200kb or somethin... and im not sure if thatd be a good idea either

languages/en/index.php

Code: Select all

 
<?php
$l['cancel'] = 'cancel';
 
?>
 
languages/de/index.php

Code: Select all

 
<?php
$l['cancel'] = 'abbrechen';
 
?>
 
..but, i dunno. so, i thought about splittin it up.. into common words, such as cancel, okay, send, submit, etc. and put em into the languages/en/index.php file and that have not so common words, which are bascially just the info on the page a user is on right now and store em in a different file, for example the page name, languages/en/page1.php

but thatd be a lotta work, i suppose

so, how i about i create a folder called de and place that into my root directory

root/de/

so, id take all those 200 files, copy them, and insert them in the root/de/ directory.. and translate each file ..without an external-language-file

and the default langauge (which would be english), just leave it in the root directory, so bascially

root/ -> english files
root/de/ -> german files

the login file, of course, would also be in the root directory ..or the signup page

but, i dunno if that would still be the best way to do it.

can anyone come up with a better idea? id really appreciate any comments/thoughts on this.

thanks,
stefan

Re: Multi-language website

Posted: Sat Feb 02, 2008 5:44 pm
by Gurzi
This may be useful to you has it was to me :)
http://mel.melaxis.com/devblog/2005/08/ ... g-gettext/