Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How will you create a bi-lingual site (multiple languages) ?

Answer Posted / abinash grahacharya

I am working on an application which is multilingual we have
basically 3 languages , french, dutch and English

Our structure doing it best way...

What we are doing ?

The structure of the files are same but we are using 3
language files for the site as fr.php, nl.php and en.php

language selected by user we are keeping that in cookie and
if there is no cookie we are setting french as default and
in cookie.

How it works ?
Based on cookie we are including the language file in
controller or main page and it is effecting the site.

Example : suppose there is a button called sendemail and the
value or button text be different in three language

in fr - Réponse
in nl - Respond
in en - Send

so in en.php
<?php
define("button_text",Send);
?>

so in fr.php
<?php
define("button_text",Réponse );
?>

so in nl.php
<?php
define("button_text",Respond);
?>


so in main controller or index page

<?php
include($_COOKIE['languague'].".php");

<input type='button' name='sendemail' value='<?php echo
button_text;?>'>


Why it is good ?
It will work very well and we can use any new language in
site like spenish - how ? create only language file called
sp.php and define value and set language cookie it will work

Thanks
:)

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what is the use of explode() function?

987


How to check your php installation?

1010


Which function would you use to merge two arrays in php?

979


How is it possible to propagate a session id?

1002


What is difference between strstr() and stristr()?

1080


Is null empty php?

1034


List some sorting functions in php?

964


How do I check if a given variable is empty?

944


Tell me how is it possible to know the number of rows returned in result set?

1092


What is the difference between die () and exit () in php?

990


Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?

1005


What is the name of scripting engine in php?

1227


How to get the http request in php?

999


What is the difference between array_pop() and array_push()?

1224


Why are sessions used?

959