How to make multilanguage website?
#1

Hi, can somone explain me how to create multilanguage website?
I don't wanna use ****** translate or other widgets since they are lame -_-
I want my website to be translated from custom file (for example languages.xml file).
Please help and I will +rep you
Reply
#2

Write php template engine and parse xml file or array.

Example multilang with Smarty
http://www.freesoftwaremagazine.com/...website_smarty
Reply
#3

or simply add a ****** translate?
Reply
#4

Quote:
Originally Posted by Nenad
Посмотреть сообщение
I don't wanna use ****** translate or other widgets since they are lame -_-
Quote:
Originally Posted by aminj
Посмотреть сообщение
or simply add a ****** translate?
Thanks for reading the topic before you post!
Reply
#5

Quote:
Originally Posted by CrunkBankS
Посмотреть сообщение
Write php template engine and parse xml file or array.

Example multilang with Smarty
http://www.freesoftwaremagazine.com/...website_smarty
Well I don't realy understand it xD

But I was searching again today and found THIS. It works great but can someone help me to modify it. By using that source my webpage is translated, but I don't want it to translate page untill user choose language for translation. And how to do this without div class's (for example instead of class's use name or id) because it bug's my webpage.
Reply
#6

What I did with my site is the main page, is the language selection. You select a language and it redirects you to the language you've chosen, for example, if I choose English, it'd say "site.com/eng.php," and if I choose for example Croatian, it'd redirect me to "site.com/cro.php." Simple but good.

OR you can use PHP and a CP in which you change languages, save the languages to a variable, and then use "if" on the page to check which language user selected.

Something like:
PHP код:
//in CP
$userlang "eng"
and then later:
PHP код:
if($userlang == "eng") {
    
// the English stuff

It's not that hard.
Reply
#7

Quote:
Originally Posted by [MM]IKKE
Посмотреть сообщение
Thanks for reading the topic before you post!
lol sorry im a little lazy to read all of the topic ^^
Reply
#8

What I did was that I made the page in Croatian, and then I made a folder called "eng" and in side I copied all the pages and I manually translated them. Works great, you only need to update the links and all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)