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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! 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