Mozilla.com/Localization: Difference between revisions

Line 93: Line 93:


I've [http://www.gerv.net/hacking/language-selection/ written up a method] for using Content-Negotiation with a per-page override and sensible bookmarking, that I use on another site. It'll handle partial translation. The only restriction is that all URLs within the site must be relative; whether that's reasonable or not depends on what the site is. Feel free to use it if it works for you.
I've [http://www.gerv.net/hacking/language-selection/ written up a method] for using Content-Negotiation with a per-page override and sensible bookmarking, that I use on another site. It'll handle partial translation. The only restriction is that all URLs within the site must be relative; whether that's reasonable or not depends on what the site is. Feel free to use it if it works for you.
'''Pros'''
* Uses visitor's Accept-Language preferences
* Allows an override
'''Cons'''
* Doesn't work for partial translations under Override mode
* Doesn't work (returns error page) under Negotiation mode if none of user's preferred languages are available


=Timeline=
=Timeline=
Confirmed users
104

edits