Localizer#getString(final String key, final Component component, final IModel<?> model, final Locale locale, final String style, final String defaultValue)
-igor On Fri, Oct 28, 2011 at 10:54 AM, Andrew Schetinin <ascheti...@gmail.com> wrote: > Hi, > > I have a question about Wicket localization I could not find an answer for. > > I have a component where I'd like to get a translated message for a given > key. > The actual string is sitting somewhere in a grand-parent panel, and I have > no any access to it. > > I'd like to get translations for that key in more than one language (I have > a list of locale names). > > It is easy to get a translation for a current locale - > component.getLocalizer().getString() would do the job. But Localizer does > not help me to get strings for other locales. > Once upon a time, there seems to be Localizer.getString() method that > accepts Locale, but as I can see now it ignores the locale parameter - the > method is deprecated in Wicket 1.4.18. > > There is also ComponentStringResourceLoader that has a method that returns a > string for a given class and any locale. But the translation string I'm > looking for is sitting somewhere up the component hierarchy - I've no idea > where - so I cannot know the class name. > > I'd appreciate if somebody could hint what classes and methods to look for, > and tell me if it is possible at all. > > Thank you in advance, > > Andrew > > -- > -- > Andrew Schetinin > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org