Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Vitalyk

macrumors newbie
Original poster
Aug 30, 2012
3
0
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.:confused:
 

ibennetch

macrumors member
Aug 9, 2008
39
0
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.
 

-pete-

macrumors member
Apr 20, 2011
93
1
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.
 

Vitalyk

macrumors newbie
Original poster
Aug 30, 2012
3
0
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?
 

960design

macrumors 68040
Apr 17, 2012
3,700
1,569
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
 

Vitalyk

macrumors newbie
Original poster
Aug 30, 2012
3
0
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?
 

steve12

macrumors newbie
Jan 11, 2013
2
0
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..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.