SitePoint Sponsor |
|
User Tag List
Results 1 to 10 of 10
Thread: Changing Language.
-
May 8, 2003, 11:44 #1
- Join Date
- Dec 2002
- Location
- Moscow, USSR
- Posts
- 1,092
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Changing Language.
How would I change the language that a site is displayed in using php? I've seen it done on many sites, and I need to have a little link at the top of my site saying "Russian Version" or "English Version", and when a user clicks, the url stays the same, but the file being retrieved is in a different language.
Any ideas on how? And how advaced is it to do something like this?Content Writing Service - Get custom SEO articles for 10$
-
May 8, 2003, 11:59 #2
- Join Date
- Apr 2001
- Location
- Canada
- Posts
- 5,458
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
There is no translation function, you have to do this yourself.
Mike
It's not who I am underneath, but what I do that defines me.
-
May 8, 2003, 12:20 #3
See how they do it at php.net http://www.php.net/source.php?url=/my.php
Owen
-
May 8, 2003, 16:48 #4
- Join Date
- Aug 2002
- Location
- Linz, Austria
- Posts
- 17
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
May 16, 2003, 06:42 #5
- Join Date
- Dec 2002
- Location
- Moscow, USSR
- Posts
- 1,092
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Oh, how would I go about doing this swithch?
How do I have a set of links that will change the text size of the document
A wonderful example is at http://getthelook.adampolselli.com/corporate.phpContent Writing Service - Get custom SEO articles for 10$
-
May 16, 2003, 06:56 #6
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Client side Javascript - cannot be done w/out page reload using server-side.
Very easy to do with the DOM btw
PHP Code:.
.
# your link for example
<a href="index...." target="_self">....</a>
.
.
# Javascript
var aHref = document.getElementsByTagName('a')[0];
# refering to first link within document only
aHref.onClick = function() {
# untested
this.style.fontFamily = "24px verdana";
}
-
May 16, 2003, 06:57 #7
- Join Date
- Dec 2002
- Location
- Moscow, USSR
- Posts
- 1,092
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That makes sense... I was just curious though. Don't have any practical reasons.
Content Writing Service - Get custom SEO articles for 10$
-
May 16, 2003, 06:58 #8
- Join Date
- Dec 2002
- Location
- Moscow, USSR
- Posts
- 1,092
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Whats DOM?
Content Writing Service - Get custom SEO articles for 10$
-
May 16, 2003, 11:01 #9
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Document Object Model -
A standard method of one thing working with Javascript for example, would also work with another language, for example:
PHP Code:# Javascript
var Para = document.getElementsByTagName('p');
alert(Para.length);
It also means that what DOM script you write for IE, would work in Netscape6+ and Mozilla and Opera6 (mostly) w/out any changes to actual script - not including the event object which Microsoft so selfishly left out of IE all together in favour of their own crude methods of detecting events.
Bloody Bast.... Ahem
It's well smart anyway and most people nowadays are all for it.
-
May 17, 2003, 12:19 #10
- Join Date
- Dec 2002
- Location
- Moscow, USSR
- Posts
- 1,092
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Technical speach... *brain hurts* ...
Content Writing Service - Get custom SEO articles for 10$
Bookmarks