Interface LocalizationCallback

All Superinterfaces:
All Known Implementing Classes:

public interface LocalizationCallback
extends AdapterCallback

An adapter callback used to localize string resources at runtime.

Currently, this will be called for any string information supplied to the MonitoringManager interface. An implementation of this interface based upon resource bundles is available in ResourceBundleLocalizationCallback.

Note: The adapter must not make any assumptions about the order in which the callback is invoked. Especially, the localizeString method may be called before the API returns, that was passed a localizeable string.

$Id: //tc/ $
See Also:
MonitoringManager, ResourceBundleLocalizationCallback

Method Summary
 String localizeString(String source, Locale targetLocale)
          Requests an adapter to localize a given string into a target locale.

Method Detail


String localizeString(String source,
                      Locale targetLocale)
                      throws LocalizationNotPossibleException
Requests an adapter to localize a given string into a target locale.

If the adapter is unable to support the requested target locale, the source string should be localized into English. If English is not available as a target locale either, the adapter needs to throw a LocalizationNotPossibleException.

source - the string to be localized
targetLocale - the target locale to localize the string to
the localized string
LocalizationNotPossibleException - if the string could not be localized

Copyright 2009 SAP AG Complete Copyright Notice