Mobile app version of vmapp.org
Login or Join
Vandalay111

: When selecting the language of a web page solely with content negotiation, will a search engine ever see different languages? I've done a simple, small site which basically only consists of a

@Vandalay111

Posted in: #Language #Seo

I've done a simple, small site which basically only consists of a single page. Simplicity and no clutter are very intentional here and (imho) work quite well for this from a UX standpoint.

Now I'm thinking of translating what little content there is in different languages. To stick with the no clutter rule I thought about doing this only with content negotiation without even having different URIs for different languages. For the user that probably works best as they get their language without needing to configure anything but their browser, but I worry about search engines. I guess it's not likely that Google, Bing, etc. crawl a site with various different language preferences, meaning that the translated content won't get picked up by them and thus not appear in regional search results.

So do I have to include links for different languages on the page or is there another way for this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

2 Comments

Sorted by latest first Latest Oldest Best

 

@Kimberly868

An alternative to browser locale (which may not be reliable from a BOT) you can use Geo-IP (as a module on your Apache webserver or with PHP). The Geo-IP option may also make more sense if you have a product to sell.

In your index.php for php module version of GeoIP:

include("geoip/geoip.inc");
$gi = geoip_open("location/to/geoip/GeoIP.dat",GEOIP_STANDARD);
$country=geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
geoip_close($gi);


If you want to use the Apache module:

$country=$_SERVER['GEOIP_COUNTRY_CODE'];


Thereafter you can put together a big 'if' or 'case' construct in your index.php to work with whatever code you have to render your page.

10% popularity Vote Up Vote Down


 

@Kristi941

An XML sitemap will show them where to find the alternative language pages. You can also put links in the footer of your pages linking to other languages. This is good usability as it allows people to easily find the language of their choice if they accidentally ended up on the page in a less-preferred language.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme