com.vaadin.flow.i18n.
Class I18NUtil
Utility class for use with determining default i18n property files and locales.
For internal use only. May be renamed or removed in a future release.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectLocalesFromFileNames
(List<String> fileNames) Get list of locales collected from the given list of translation file names.
static boolean
containsDefaultTranslation
(ClassLoader classLoader) Check if we have a default translation properties file
DefaultI18NProvider.BUNDLE_FILENAME
in the folderDefaultI18NProvider.BUNDLE_FOLDER
getDefaultTranslationLocales
(ClassLoader classLoader) Check that we have the translation folder
DefaultI18NProvider.BUNDLE_FOLDER
and collect all translation properties files.protected static org.slf4j.Logger
getTranslationFiles
(URL resource)
-
Field Details
-
PROPERTIES_SUFFIX
See Also:
-
-
Constructor Details
-
I18NUtil
public I18NUtil()
-
-
Method Details
-
containsDefaultTranslation
Check if we have a default translation properties file
DefaultI18NProvider.BUNDLE_FILENAME
in the folderDefaultI18NProvider.BUNDLE_FOLDER
For internal use only. May be renamed or removed in a future release.
Returns:
true
if default property file found -
getDefaultTranslationLocales
Check that we have the translation folder
DefaultI18NProvider.BUNDLE_FOLDER
and collect all translation properties files. Parse names to get locales.For internal use only. May be renamed or removed in a future release.
Returns:
List of locales parsed from property files.
-
collectLocalesFromFileNames
Get list of locales collected from the given list of translation file names.
Parameters:
fileNames
- List of file namesReturns:
List of locales
-
getTranslationFiles
-
getLogger
protected static org.slf4j.Logger getLogger()
-