Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 31, 2012, 02:49 AM   #1
Vitalyk
macrumors newbie
 
Join Date: Aug 2012
Send a message via Skype™ to Vitalyk
how to change language on website

Please help to find out how to make changing languages correctly on my website: http://www.krasota-gor.ru so that three languages may be on one page (index.html). At this time I use only that method (3 different pages for each language - index, nindex, bahindex.html). Tell please what script can I take and if possible where can I find an example of that.
Vitalyk is offline   0 Reply With Quote
Old Sep 1, 2012, 02:49 AM   #2
Hexiii
macrumors 6502a
 
Join Date: Jun 2011
Location: Prague, Czech Republic
What's wrong with this? I think this is the better solution.

Or even better, you can make a new folder and make index.html and /bah/index.html.
Hexiii is offline   1 Reply With Quote
Old Sep 1, 2012, 09:17 AM   #3
ibennetch
macrumors member
 
Join Date: Aug 2008
I agree with Hexiii in that I don't see anything wrong with how you do it now...but I, too, would put each language in a separate subdirectory rather than scattering various versions around your main directory.

If you load each language on one page, you're going to force your visitors to download languages they don't need, plus the JavaScript files to hide/show the proper language...you're looking at adding a lot of overhead to the file. Some CMS systems handle multiple languages very well, by the way; something else to think about.

If you're really set on doing it your way, I'd set it up so each language has a subdirectory, translate only the text on the page, use server-side includes to include each translation in your main page, then write some JavaScript to hide/display the proper sections.
ibennetch is online now   0 Reply With Quote
Old Sep 1, 2012, 05:54 PM   #4
-pete-
macrumors member
 
Join Date: Apr 2011
Hexiii's method is pretty decent and will work fine on a site of this size.

If you are a feeling more adventurous you could try storing your content in a number of database tables (one for each language) and loading the appropriate text in depending on the page of the site.
-pete- is offline   1 Reply With Quote
Old Sep 2, 2012, 02:45 AM   #5
Hexiii
macrumors 6502a
 
Join Date: Jun 2011
Location: Prague, Czech Republic
And the JS is not really good choice if you want link somebody to your site in his language.
Hexiii is offline   0 Reply With Quote
Old Sep 3, 2012, 06:54 AM   #6
Vitalyk
Thread Starter
macrumors newbie
 
Join Date: Aug 2012
Send a message via Skype™ to Vitalyk
Thank you. But it seems to me that there is another problem. I cannot see all of my pages in search engines, only can see the main page. For example, if I want to see in search engine my page "Elbrus" in Russian language, or my page "Alpine flowers" in Indonesian language, I cannot. Tell please, what reasons can be? Can it be because of my inappropriate JavaScript or there is another reason?
Vitalyk is offline   0 Reply With Quote
Old Sep 5, 2012, 02:09 PM   #7
960design
macrumors 6502a
 
Join Date: Apr 2012
Location: Destin, FL
+1 for -pete-

Load language into database files. Pull content via php based on the base language, if base language not found use default language to fill content.

just us
__________________
TI-99/4A, tape cassette, 12" B&W Zenith
960design is offline   0 Reply With Quote
Old Jan 2, 2013, 08:46 PM   #8
Vitalyk
Thread Starter
macrumors newbie
 
Join Date: Aug 2012
Send a message via Skype™ to Vitalyk
Thank all of you for these suggestions, but now I don't understand the present situation: why my website is not detected by searching engines, even though I registered my website in many search engines?
Vitalyk is offline   0 Reply With Quote
Old Jan 11, 2013, 04:09 AM   #9
steve12
Banned
 
Join Date: Jan 2013
I think Hexii's method is nice one.. I am agreeing with him .. If you are adventurous than I suggest you to make different tables in Database. One for each language..
steve12 is offline   0 Reply With Quote

Reply
MacRumors Forums > Special Interests > Visual Media > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Change OS language? Namepicker OS X 2 Jun 13, 2013 07:46 PM
Change default language will0407 Mac Basics and Help 1 Feb 15, 2013 05:42 PM
OS X: Bastion:how to change language? GreenYogi Mac and PC Games 0 Feb 9, 2013 08:48 AM
Is there a way to programmatically change the language being used? NukemHill iPhone/iPad Programming 0 Dec 12, 2012 03:22 PM
How to change Video Language? amitabhbansal Apple TV and Home Theater 1 Oct 6, 2012 03:11 PM

Forum Jump

All times are GMT -5. The time now is 12:22 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC