Announcement

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

    Localization bug?

    How can we localize 'true' and 'false' for FieldType.BOOLEAN?

    We have a fieldType of boolean in our ds.xml with a storage strategy of integer (0 or 1).

    The values of 'true' and 'false' aren't localized whenever we change the locale, however.

    I checked the built-in SmartGwtMessages and there doesn't appear to be a key for these.

    Are there any other suggestions for this?

    #2
    Never tried this with an integer , so let us know if this works for the field in question

    Code:
    type="boolean"  sqlStorageStrategy="singleChar" sqlTrueValue="1" sqlFalseValue="0"

    Comment


      #3
      'true' and 'false' are internal values not normally shown to end users (like 'null'), so they are not localized. Is there some context where users are able to see these values in your application?

      Comment


        #4
        Yea, all of the databound components that have FieldType.BOOLEAN and SqlStorage of integer.... hehe, that is the whole point :) It is everywhere in our app with a boolean field (or so it seems). I'm doublechecking.

        Instead of showing '0' or '1', they show 'false' and 'true' respectively.

        Okay, it looks like by default, it shows a checkbox for databound components.

        Let me see what is up - a client is reporting they are seeing 'true, false' and they want us to localize and when I looked on that screen, it was true, false and I didn't see anything different in the ds.xml. Maybe there is something in code that is causing it to show up that way.
        Last edited by amcculley; 14 Feb 2013, 14:49.

        Comment


          #5
          Explicitly setting a field with type "integer" in a ListGrid would have this effect. Maybe somebody was thinking of the underlying numeric value and chose this type instead of "boolean"?

          Comment


            #6
            Thanks for the reply. Will take a look at this later since it seems isolated to just a couple of places... definitely a low priority for us.

            Comment

            Working...
            X