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 int
The fieldDEFAULT_LANGUAGE
contains the index of the default language. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic String
defaultLanguage
(@NonNull CtanConfiguration config) The methoddefaultLanguage
provides means to check the CtanConfiguration and extract the default language.static String
defaultLanguage
(@NonNull CtanConfiguration.CtanConfig config) The methoddefaultLanguage
provides means to check the CtanConfiguration and extract the default language.static String
fallbackLanguage
(@NonNull CtanConfiguration.CtanConfig config, String locale) The methodfallbackLanguage
provides means to check the language or extract the default language from the configuration.static String[]
languages
(@NonNull CtanConfiguration.CtanConfig config) The methodlanguages
provides means to extract the supported languages from the configuration.
-
Field Details
-
DEFAULT_LANGUAGE
static final int DEFAULT_LANGUAGEThe fieldDEFAULT_LANGUAGE
contains the index of the default language.- See Also:
-
-
Method Details
-
defaultLanguage
The methoddefaultLanguage
provides means to check the CtanConfiguration and extract the default language.- Parameters:
config
- the CTAN configuration- Returns:
- the default language
-
defaultLanguage
The methoddefaultLanguage
provides 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 methodfallbackLanguage
provides 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 methodlanguages
provides means to extract the supported languages from the configuration.- Parameters:
config
- the CTAN configuration- Returns:
- the supported languages
-