Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Why do you believe you'd have to split the resources? We don't know of a reason that you couldn't use a single resource bundle for string embedded in your GWT code and messages in your DataSource.

    Comment


      #17
      Hi, I did all as you said. And I've got DS titles from one of my .properties files. But I can't switch locale. When I change ?locale=... parameter all strings localized in java code like this:
      Code:
      MyMessagesClass cnsts = GWT.create(MyMessagesClass.class);
      cnsts.my_localizable_text();
      do change locale, but DS titles always remain in same locale (in my case it is ru locale).
      As I suppose DS localizations occures once per session and may be it happens before request parameter ?locale=... was read.
      How can I select locale at least for the session?

      Comment


        #18
        Pass the locale parameter to the .jsp that loads your DataSource definitions and use standard JSTL tags to access locale-specific resource bundles. If you're unfamiliar with JSP/JSTL, there are many tutorials available via Google.

        Comment


          #19
          OK, so GWT cannot do it authomatically as GWT.create does.
          This code on main jsp page works fine:
          Code:
          <%@ taglib prefix="fmt" uri="/WEB-INF/tld/fmt.tld" %>
          <%@ page isELIgnored ="false" %>
          <fmt:setLocale value="${param['locale']}" scope="session"/>
          thanks

          Comment

          Working...
          X