[Yanel-dev] Switching the locale

Michael Wechner michael.wechner at wyona.com
Wed Jul 18 09:56:16 CEST 2007


Josias Thöny wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> I would like to implement the feature that one can switch the local 
>> session wise, e.g.
>>
>> /foo/bar.html?yanel.usecase.switch-locale=de
>>
>> resp.
>>
>> /foo/bar.html?yanel.usecase=switch-locale&yanel.usecase.switch-locale.lang=de 
>>
>>
>> and then this language would be part of the session and the Resource
>>
>> src/core/java/org/wyona/yanel/core/Resource.java
>>
>> could grab it from there.
>>
>> WDYT?
>
>
> I do not really understand the difference between the locale-language 
> and the "other" language yet. Can you explain which language is used 
> for what?


- Localization language
   This is normally the native language of a person
- Translation language
   This is the language of some text/content

For instance a website can be localized in two languages, but the text 
itself exists only in one language, e.g.

Profession: Teacher

Beruf: Teacher


Or the website could be localized in one language, but the text itself 
exist in two languages, e.g.

Profession: Teacher
Profession: Lehrer

>
> When I open
> http://localhost:8080/yanel/yanel-website/en/about.html
> in my browser (browser-language is de-ch) the navigation is is German,


since your localization is de the navigation is by default in german

> the page content is in English,


since you are on the english version/translation of this content 
/en/about.html the content is in english

> and the language links don't allow me change to the German page.


well, the links themselves work

http://yanel.wyona.org/de/ueber.html
http://yanel.wyona.org/en/about.html
http://yanel.wyona.org/es/acerca.html

but there seems to be a bug within the EN | DE | ES generation. I will 
take a look at it.

> Actually I don't think this makes much sense.
>
> I don't understand why the navigation should have a different language 
> than the content.


you are free to choose this resp. the one who maintains the website can 
configure this.
In some cases in makes sense and others it doesn't.

But the important thing is to differentiate between translation and 
localization, which isn't the same and Yanel allows this.

Makes sense now?

Cheers

Michi

>
> Josias
>
>
>
>
>>
>> Related to this it would be good to implement this also for the user 
>> profile, which means a user  can configure the locale within his/her 
>> own profile.
>>
>> Cheers
>>
>> Michi
>>
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development



-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list