newsNews: Article: i18n via content negotiation at home.gna.org

 
 
Show feedback again
Latest News
Gna.org SSL certificate renewed posted by zerodeux, Thu 24 Apr 2014 07:13:06 AM UTC - 0 replies
Heartbleed status and measures posted by beuc, Wed 09 Apr 2014 09:47:29 AM UTC - 1 reply
mail subsystem automatically reinstalled posted by beuc, Sat 08 Mar 2014 11:02:17 PM UTC - 0 replies
Reboot posted by beuc, Tue 04 Mar 2014 10:14:15 PM UTC - 2 replies
download+homepage subsystem automatically reinstalled posted by beuc, Sun 02 Mar 2014 09:53:20 PM UTC - 8 replies
[122 news in archive]

Article: i18n via content negotiation at home.gna.org

Item posted by Mathieu Roy <yeupou> on Wed 03 Mar 2004 07:34:36 PM UTC.

How do I internationalize my website hosted by Gna! at http://home.gna.org ? The easier solution is to use the server content negociation, something pretty standard with apache nowadays.

To add a translation, you just have to add a file called like $filename.$lang.html. For instance, the German translation of the index file would be named index.de.html. When a German user will browse your index page, when asking for /index, the apache server will return him the German page, index.de.html.

It means that you should advertise pages with .lang.html only if you want to point to a specific translation, and advertise pages like /blabla (for blabla.$lang.html) the rest of the time.

http://www.debian.org/ is an example of content negotiation usage for internationalization: all the internal links are like /social_contract, always redirecting you to the translated file. But you can access translated versions with direct pointers like /social_contract.es.html (Spanish) and /social_contract.de.html (German).

Apart from that, we advise you to take care of outdated translations. You can can use the CVS tags like $Date: $ or $Id: $ to print inside your pages version information, in a warning to users.

(We assume that you already used your homepage area, managed via CVS, that everything worked well. If it is not the case, please read the related FAQ entries first)

This article comes from the FAQ entry: https://gna.org/faq/?question=Homepage_Server__--__How_do_I_internationalize_my_website.txt

Comments:

No messages in Article: i18n via content negotiation at home.gna.org

 

Start a New Thread:

You could post if you were logged in
Show feedback again

Back to the top


Powered by Savane 3.1-cleanup