Skip to main content
1-Visitor
July 31, 2013
Solved

How to LocalizedMessage from ResourceBundle file using code ?

  • July 31, 2013
  • 1 reply
  • 2752 views

I have on requirement like ,in which I need to get Localized Message of Partusage Quantity (form wt.part.QuantityUnitRB) in OOTB Key values like ea,kg ..

How to get Dispaly value using code ?

I am not able to find right method from wt.util.WTMessage class

Best answer by PatrickMcEvoy

String resourceBundle = wt.part.QuantityUnitRB.class.getName();

String key = "ea"; // or "l" or "kg" or "as_needed", etc.

String localizedName = wt.util.WTMessage.getLocalizedMessage(resourceBundle, key);

1 reply

1-Visitor
July 31, 2013

String resourceBundle = wt.part.QuantityUnitRB.class.getName();

String key = "ea"; // or "l" or "kg" or "as_needed", etc.

String localizedName = wt.util.WTMessage.getLocalizedMessage(resourceBundle, key);

1-Visitor
August 5, 2013

Hi Patrick

Actually there is no wt.part.QuantityUnitRB.class file only .SER file is available in windchill.

How to get value from .SER file

1-Visitor
August 5, 2013

Just drop the "RB" from the class name in the example Patrick gave you. *RB.rbInfo files compile into *.class files.

String resourceBundle = wt.part.QuantityUnit.class.getName();

String key = "ea"; // or "l" or "kg" or "as_needed", etc.

String localizedName = wt.util.WTMessage.getLocalizedMessage(resourceBundle, key);