| Hi Amedeo, you'll get this issue if the browser/system doesn't have one of the available language (or doesn't request the page in a specific language, you make some test using OmniWeb that allows you to try requesting the page in a specific language or none). To make it work with a "fall back" language, you need to do: -add the following to your Session.java ---- public void setLanguages(NSArray aLanguageArray) { if ((aLanguageArray == null) || (aLanguageArray.count() == 0)) { aLanguageArray = new NSArray("French"); //or your fallback language;) } super.setLanguages(aLanguageArray); } ---- -if you have a direct action that has a language parameter, here's what I'm using in DirectAction.java: ---- public WOActionResults directAccessAction(){ String langue = (String)request().formValueForKey("lang"); String page = (String)request().formValueForKey("section"); NSMutableArray languages = new NSMutableArray(); if (langue.equals("fr")) languages.addObject("French"); if (langue.equals("en")) languages.addObject("English"); if (langue.equals("es")) languages.addObject("Spanish"); if (langue.equals("ru")) languages.addObject("Russian"); if (languages.count()==0) languages.addObject("French"); session().setLanguages(languages); return pageWithName(page); } ---- This should work. Xavier
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
