Interface ILocaleConfig
interface ILocaleConfig
Extends com.amazon.apmf.IStandard
ILocaleConfig
Locale config for a given application.
Methods
getResolvedLocales()
Gets an ordered list of the resolved locales that are available to the requesting app. Resolved locales are the result of matching the requested locales (those which the customer requested) against the available locales (those supported by an application).com.amazon.apmf.Locale[]getResolvedLocales(com.amazon.kepler.config.IConfigScope?scope)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
Returns
com.amazon.apmf.Locale[]
An ordered list of resolved locales ordered by decreasing order of preferences.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required read permission for the specified scope. com.amazon.apmf.BaseError for all other errors.
getAvailableLocales()
Gets an unordered list of the locales that are available to the requesting app.com.amazon.apmf.Locale[]getAvailableLocales(com.amazon.kepler.config.IConfigScope?scope)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
Returns
com.amazon.apmf.Locale[]
An unordered list of available locales.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required read permission for the specified scope. com.amazon.apmf.BaseError for all other errors.
setAvailableLocales()
Sets the locales that are available to the app. The locales are provided as an unordered list.voidsetAvailableLocales(com.amazon.kepler.config.IConfigScope?scope,com.amazon.apmf.Locale[]locales)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
locales
com.amazon.apmf.Locale[] — Required
An unordered list of available locales.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required write permission for the specified scope. com.amazon.apmf.BaseError for all other errors.
setRequestedLocales()
Sets an ordered list of locales that the customer wants to associate with the app.voidsetRequestedLocales(com.amazon.kepler.config.IConfigScope?scope,com.amazon.apmf.Locale[]locales)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
locales
com.amazon.apmf.Locale[] — Required
The list of requested locales ordered by decreasing order of preference.
To clear the requested locales, pass an empty list of locales.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required write permission for the specified scope. com.amazon.apmf.BaseError for all other errors.
getRequestedLocales()
Gets an ordered list of the locales that the customer has associated with the app. This API accepts the following config scopes: PLACE_HOLDER.com.amazon.apmf.Locale[]getRequestedLocales(com.amazon.kepler.config.IConfigScope?scope)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
Returns
com.amazon.apmf.Locale[]
The list of requested locales, ordered by decreasing order of
user preference.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required read permission for the specified scope. com.amazon.apmf.BaseError for all other errors.
addResolvedLocalesListener()
Adds a listener that is called when the resolved locales list changes.com.amazon.apmf.ISubscription*addResolvedLocalesListener(com.amazon.kepler.config.IConfigScope?scope,IResolvedLocalesListener*listener)
Parameters
scope
com.amazon.kepler.config.IConfigScope? — Optional
Not supported. Pass a nullptr.
listener
IResolvedLocalesListener* — Required
The listener to call when the resolved locales list changes.
Returns
com.amazon.apmf.ISubscription*
An ISubscription object related to the listener.
Throws
com.amazon.kepler.config.NotAllowedForScopeError— when the app doesn’t have the required read permission for the specified scope. com.amazon.apmf.BaseError for all other errors.

