473,574 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create web page in multiple language

hello

vishal here

i want to craete site which shows the contents as per the langauge i
choose. so can anyone give me idea that how this is possible. i know
tha problem but i don't have any idea about soultion. so pls reply me
if u know

thxs in advance........ ...

Jul 17 '05 #1
3 2072
vishal <vi************ @yahoo.co.in> wrote:
i want to craete site which shows the contents as per the langauge i
choose. so can anyone give me idea that how this is possible. i know
tha problem but i don't have any idea about soultion. so pls reply me
if u know


I have this solotion for my site:
files:
lang.hr.php
lang.en.php
lang.de.php
with langugae variables in files:
(hr)
$welcome = "Dobrodosli ";
(en)
$welcome = "Welcome";
(de)
$welcome = "Willcomen" ;
and so on...

Then, I give my visitors cookie $_COOKIE['lang'], as my site is primary
for croatian vistors, I just look if visitor have choosen other language
on his visit before (that was *my-clumsy-english*...sorr y):

//"gui" part
if(isset($_COOK IE['lang'])) {
$lang = "$_COOKIE[lang]";
} else {
$lang = "hr";
}
include("lang/lang.$lang.php" );

//site content
mysql_query("SE LECT * FROM table WHERE (somthing='$wan ted_content' AND
lang = '$lang')";

//in case of some old not yet converted static data:
include("data/$lang/$linked_file");

.... that wasn't "copy-paste" method, so some "typing errors" are
possible...

--
Jan ko?
http://fotozine.org/?omen=janimir
--
Jul 17 '05 #2
"vishal" <vi************ @yahoo.co.in> wrote in
news:11******** **************@ o13g2000cwo.goo glegroups.com:
hello

vishal here

i want to craete site which shows the contents as per the langauge i
choose. so can anyone give me idea that how this is possible. i know
tha problem but i don't have any idea about soultion.


One method, that is suitable in some circumstances
(but not all) is to use gettext
http://www.php.net/manual/en/ref.gettext.php

Another approach would be to use the PEAR
Translation2 class:
<http://pear.php.net/manual/en/packag...ranslation2.ph
p>

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
Jul 17 '05 #3
"vishal" <vi************ @yahoo.co.in> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
hello

vishal here

i want to craete site which shows the contents as per the langauge i
choose. so can anyone give me idea that how this is possible. i know
tha problem but i don't have any idea about soultion. so pls reply me
if u know

thxs in advance........ ...


That depends on what the languages are. The solution for handling English,
French, and German is quite different from handling English, Chinese, and
Arabic.
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2805
by: Guy Deprez | last post by:
Hi, i'm having a problem to create indexes. STEP 1 ----------- Connection is OK (you can find the string at the end of the message) Table ("Couleurs") creation is OK STEP 2. Index Creation
3
2363
by: Varad | last post by:
Hi all Pls give me some insight as to what I should be doing. I have a form where I have 20 text boxes and when an user submits the form I save it to a database. When they want to retrieve it, I loop and create the textboxes with ID and text value and then add to the form. The problem is when trying to create the control in the code behind...
1
2828
by: Robizzle | last post by:
I'm writting a script that produces html source code from form input. My problem is that I want to format my html source with new lines and tabs. So, I have a string that holds all the contents of the source and my php script displays it by saying echo '<form><textarea>'.$sourcestring.'</textarea></html>'; All of that is working...
22
23337
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete examples?
2
3047
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is what I'm hoping to achieve. I've never before had to use Javascript closures, but now I do, so I'm making an effort to understand them. I've been...
6
4857
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
1
2341
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM to 5 AM and 6 PM to 7 PM server2: down betn 7 AM to 7:30 AM server3: down betn 3 AM to 5 AM and 2 Pm to 3 PM
3
1856
by: rgparkins | last post by:
Hi This has been asked before but with no resolution so I am putting it out there again in case someone has an answer. 2 user controls with same name List.ascx but different namespace, and I drag them onto the page. When the page is displayed I get Compiler Error Message: CS1595: 'ASP.List_ascx' is defined in multiple places; using...
3
8708
by: imrantbd | last post by:
I need array type name like "destList" must use for my destlist select box,not a single name.Or need a solution to capture multiple value of "destList" select box and send all selected value in php page.The multiple select value then insert in database added by comma.The following is my code: Form Page:form.php <head> <script...
5
14111
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
0
7814
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8253
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7827
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6471
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5632
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3752
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2253
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1356
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.