I would like to control locale selection in a programmatic way.
We have different default locales for the pages in our application. E.g. the
StartPage may be default "german", but another Page, call it PageTwo, my have a
default locale "english". The default language for a page is not static but
decided programmatically.
Example of desired behavior:
1. User enters StartPage : all Strings are in German language
2. User clicks on the PageTwo-Link
3. PageTow is presented in English language
General desired, programmatic behavior:
User requests the Page PageTwo
if (Does the locale cookie "org.apache.tapestry.locale" prefer a locale?) {
Use this locale;
}
else if (Does PageTwo have a default-locale?) {
Use this locale;
}
else if (Does the Browser prefer a locale?) {
Use this locale;
}
else if (Does the Application have a default locale?) {
Use this locale;
}
else {
Use the fallback locale (PageName.properties)
}
The order of locale decision is therefore:
Cookie->Page->Browser->Application->Fallback
Has anybody solved this problem already?
The default behavior of Tapestry is different, which means:
Cookie->Browser->Fallback
How can I change this behavior?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]