Luistxo Fernandez wrote:
David:
Another advantage (for you) to moving to the CVS is that it gives
you more
power to change "USER_PREF_LANGUAGES", so you'll be able to implement,
for example "possitive discrimination of a given language".
Now, that´s what a customer demanded us for an ongoing project.
Languages for the site: Spanish (es) / Basque (eu).
It´s a site about Basque-language promotion. It happens that many
Basque users just get customised PCs out of the shop with a
spanish-configured browser (marketing options go that way around
here). Then it would happen that many users would find Spanish
first... Not very elegant, given the site´s nature.
Dirty solution that we found: The locales for Localizer will be Irish
(ga) and Basque (eu, set as default). And (ga) will be disguised as
Spanish... So, everybody will get Basque first, except people with
browsers configured for Irish, who will get a Spanish version.
Disclaimer: Our choice for Irish has nothing to do with Gaelic.. It´s
just that its ISO 2-letter code 'ga' fits somehow with the Basque
name of the Spanish language ('Gaztelania').
Luistxo
Yes, it's a bit dirty. With the CVS version you would do:
1. Install a Localizer instance in the root of your web site.
Reminder, from now the Localizer meta type will be used for language
negotiation purposes only.
2. Add a Python script to the Localizer object named, for example,
"accept_basque", it will receive one parameter: "accept_language".
The script will contain one line: "accept_language.set('ba', 5.0)"