Maps API for JavaScript Developer's Guide

H.ui.i18n.Localization

Class Summary

This class is used for internationalization of UI components.

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

getLocale () : {string}

This method returns current locale code i.e 'en-US'

getKeys () : {Array<string>}

This method returns translation keys for current locale. Keys from this set can be used to get translations via translate method.

hasKey (key) : {boolean}

This method returns a boolean value indicating whether this localization object has a translation for the specified translation key.

translate (key) : {string}

This method returns translation for provided key. It throws exception if translation is not available

Class Description

This class is used for internationalization of UI components.

Constructor Details

H.ui.i18n.Localization(locale, opt_translationMap)

Parameters:
 
locale:
{string}
 
locale code i.e en-GB
opt_translationMap:
{Object=} [optional]
 
optional translation map for this locale if not provided Locale will be initialized with default translations if available

Method Details

getLocale () : {string}

This method returns current locale code i.e 'en-US'

Returns:
 
{string}
locale code

getKeys () : {Array<string>}

This method returns translation keys for current locale. Keys from this set can be used to get translations via translate method.

Returns:
 
{Array<string>}

hasKey (key) : {boolean}

This method returns a boolean value indicating whether this localization object has a translation for the specified translation key.

Parameters:
 
key:
{string}
 
a transaltion key
Returns:
 
{boolean}
true if the key exists, otherwise false.

translate (key) : {string}

This method returns translation for provided key. It throws exception if translation is not available

Parameters:
 
key:
{string}
 
a translation key
Returns:
 
{string}
a localized string corresponding to provided key

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.