•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,510 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,681 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2341 | Replies: 10 | Solved
![]() |
•
•
Join Date: Aug 2007
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
I want to construct a web page with language flags. The user clicks his flag and the web page is then displayed in his language. In VB6 I would achieve this with a resource file. Does HTML, PHP or CSS have something like that or must I create a web site for each language.
I would very much appreciate any advice on this. The Languages would be English, German, Dutch and Danish
Many thanks
Tony
I would very much appreciate any advice on this. The Languages would be English, German, Dutch and Danish
Many thanks
Tony
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
just thought of a different way. what you could do is have a language directory. in that directory you have folders with the language name on it. ex (English, Spanish, ect.). in these directories you have the same files (header.html,footer.html,mainbody.html, ect.) and all you have to do is change the language of the text in each file that corresponds to the folder. if the file names are different in each folder it will not work. then php will read the url and change the include directory in the page using a session.
this might be a bit confusing. if it is i will go into more detail, maybe even some code. all you have to is let me know.
this might be a bit confusing. if it is i will go into more detail, maybe even some code. all you have to is let me know.
Last edited by kkeith29 : Sep 29th, 2007 at 5:04 pm.
•
•
Join Date: Aug 2007
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
I think I might have sent my reply as a general reply and not to you personally. So I have tried again
Would have got back to you quicker but I had to re-boot.
It is a bit confusing, it would be great if you could show how to do it with a bit of code. I am new to Web pages and am just learning PHP and CSS
Many thanks
Tony
Would have got back to you quicker but I had to re-boot.
It is a bit confusing, it would be great if you could show how to do it with a bit of code. I am new to Web pages and am just learning PHP and CSS
Many thanks
Tony
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
•
•
Join Date: Aug 2007
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
I don't have any HTML code as yet. I had not started because of the language question. I didn't want to put a lot of work into the pages only to find out I had to start again. But I will do a simple front page but that might take a couple of days if that is ok with you.
Sorry, but another silly question -How to I post you the HTML?
Regards
Tony
Sorry, but another silly question -How to I post you the HTML?
Regards
Tony
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
it is quite simple..
index.php?lang=en
links to change lang.
?lang=hu
?lang=spa
?lang=deu
requesting,
$lang = $_request['lang'];
if ( $lang = "" || $lang = "en")
{
header('Location: /en/');
}
if ( $lang = "hu" );
{
header('Location: /hu/');
}
and so on....
if u wanna go further.. check explorer's default language.. that would be cool.
index.php?lang=en
links to change lang.
?lang=hu
?lang=spa
?lang=deu
requesting,
$lang = $_request['lang'];
if ( $lang = "" || $lang = "en")
{
header('Location: /en/');
}
if ( $lang = "hu" );
{
header('Location: /hu/');
}
and so on....
if u wanna go further.. check explorer's default language.. that would be cool.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
adult advertising blog browser browsing community data design development devices domains firefox google html india intel internet java legal linux marketing math microsoft mobile applications mozilla msn multimedia navigation news php privacy report research rss search security seo software sun survey technology video w3c web web development wiki xml yahoo youtube
- A multi language string (PHP)
- Allowing limited authorship to a web page. (JavaScript / DHTML / AJAX)
- Read a web page and write the contents to a file (ASP)
- web page creation (HTML and CSS)
- Change Web Page Font Size on the Fly (Windows tips 'n' tweaks)
- How to create a web page with scrolling menus to specific entries (HTML and CSS)
- DEfault web page has been jacked by a passthrough (Viruses, Spyware and other Nasties)
- unable to access my web page (Domains and DNS)
- Opening a Web Page in a New Window (Windows tips 'n' tweaks)
- Win XP Explorer - Web Page View (Windows NT / 2000 / XP / 2003)
Other Threads in the PHP Forum
- Previous Thread: RFID Middleware development
- Next Thread: showing strings in random positions...?


Linear Mode