com.force.i18n.LocalizerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grammaticus Show documentation
Show all versions of grammaticus Show documentation
Localization Framework that allows grammatically correct renaming of nouns
/*
* Copyright (c) 2017, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package com.force.i18n;
import java.net.URL;
import java.util.Locale;
import java.util.TimeZone;
/**
* Provider for a Localizer.
* @author stamm
*/
public interface LocalizerProvider {
/**
* NOTE: DO NOT USE THIS FOR CULTURE LOCALIZATION
* This really should be deprecated
* @param language the language for the user
* @return a localizer that can only be used for labels
*/
BaseLocalizer getLabelLocalizer(HumanLanguage language);
/**
* @return a localizer based on a locale, a currency, a language and a timezone.
* @param locale the locale for number and date formatting
* @param currencyLocale the locale for currencies
* @param language the human language
* @param timeZone the time zone
*
*/
BaseLocalizer getLocalizer(Locale locale,
Locale currencyLocale, HumanLanguage language, TimeZone timeZone);
/**
* @param langLocale the localizer for the given locale, using that locale for language and localization
* @return a localizer for the given locale
*/
BaseLocalizer getLocalizer(Locale langLocale);
BaseLocalizer getLocalizer(HumanLanguage language);
LabelSet findLabelSet(HumanLanguage language);
/**
* @return the default localizer for this instance, generally English, unless this particular instance
* of Grammaticus is set to a different default.
* Use this if you have no idea what to display or you don't care too much; generally you do.
*/
BaseLocalizer getDefaultLocalizer();
/**
* @return the localizer for US English.
*/
BaseLocalizer getEnglishLocalizer();
URL getLabelsDirectory();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy