cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to LocalizedMessage from ResourceBundle file using code ?

ManikandanVelay
12-Amethyst

How to LocalizedMessage from ResourceBundle file using code ?

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

ACCEPTED SOLUTION

Accepted Solutions

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);

View solution in original post

5 REPLIES 5

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);

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

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);

Thanks Patrick & Matthew.

Thank you. I'd give Patrick the Correct and me the Helpful though. 🙂 He did the work for ya, I just happened to run across the thread.

Announcements


Top Tags