Package org.ctan.site.services.util
Interface ConfigUtils
public interface ConfigUtils
The class
ConfigUtils contains utilities for the configuration.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe fieldDEFAULT_LANGUAGEcontains the index of the default language. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringdefaultLanguage(@NonNull CtanConfiguration config) The methoddefaultLanguageprovides means to check the CtanConfiguration and extract the default language.static StringdefaultLanguage(@NonNull CtanConfiguration.CtanConfig config) The methoddefaultLanguageprovides means to check the CtanConfiguration and extract the default language.static StringfallbackLanguage(@NonNull CtanConfiguration.CtanConfig config, String locale) The methodfallbackLanguageprovides means to check the language or extract the default language from the configuration.static String[]languages(@NonNull CtanConfiguration.CtanConfig config) The methodlanguagesprovides means to extract the supported languages from the configuration.
-
Field Details
-
DEFAULT_LANGUAGE
static final int DEFAULT_LANGUAGEThe fieldDEFAULT_LANGUAGEcontains the index of the default language.- See Also:
-
-
Method Details
-
defaultLanguage
The methoddefaultLanguageprovides means to check the CtanConfiguration and extract the default language.- Parameters:
config- the CTAN configuration- Returns:
- the default language
-
defaultLanguage
The methoddefaultLanguageprovides means to check the CtanConfiguration and extract the default language.- Parameters:
config- the CTAN configuration- Returns:
- the default language
-
fallbackLanguage
static String fallbackLanguage(@NonNull @NonNull CtanConfiguration.CtanConfig config, String locale) The methodfallbackLanguageprovides means to check the language or extract the default language from the configuration.- Parameters:
config- the CTAN configurationlocale- the language- Returns:
- the language
-
languages
The methodlanguagesprovides means to extract the supported languages from the configuration.- Parameters:
config- the CTAN configuration- Returns:
- the supported languages
-