Skip to main content
Mitratech Success Center

Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Internationalization

TeamConnect provides ways for you to customize system and custom data for multiple languages and regions. In addition to changing the language in the user interface, you can also change the currency and the time and date display for a specified region.

InternationalizationService is the main interface for working with different locales and currencies. None of the methods for this interface change anything in your version of TeamConnect. However, you can use the methods to retrieve information based on specified locales. If an InternationalizationService method does not require a locale, the code uses the current user's locale.

InternationalizationService includes methods for the following types of actions:

  • Converting currency — You can use the convertCurrency() method to convert one type of currency to the system currency. The following code sample converts 100 British Pounds to the system currency.
BigDecimal value = new BigDecimal(100); 
BigDecimal valueInOtherCurrency =
platform.getInternationalizationService().convertCurrency(value, "GBP");
  • Retrieving the currency based on a code — You can use the getCurrency() method to retrieve a currency. The following code sample returns the currency object for GBP, which includes the currency's code, symbol, and exchange rate.
Currency currency = internationalizationService.getCurrency("GBP");
  • Retrieving values for a system or user setting — For example, you can use the getCurrentUserLocale() method to return the locale of the current user, as shown in the following code sample.
Locale currencyUserLocale = internationalizationService.getCurrentUserLocale();
  • Returning a localized version of a string or number — For example, you can use the localizeNumber() method to determine the format of a number based on the locale. The following code sample returns 5.555,55 for the French locale.
String localizedNumberString = internationalizationService.localizeNumber(new BigDecimal(5555.55), Locale.FRANCE);

You can also use the localize() method with a custom message to format the date.

  • Sorting based on a locale — Based on the current user's locale, you can use the sortCategories() method or the sortLookupItems() method to sort items with the same display order alphabetically, as shown in the following code sample.
List<LookupItem> sortedLocalizedLookupItems = internationalizationService.sortCategories(unsortedLookupItems);

NoteTo update the display order, use the CategoryDefinition interface for categories and the LookupItem interface for lookup items.

Note: Use the following code to access InternationalizationService: InternationalizationService internationalizationService = platform.getInternationalizationService();

  • Was this article helpful?