Package com.vaadin.flow.i18n
Class I18NUtil
java.lang.Object
com.vaadin.flow.i18n.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 fileDefaultI18NProvider.BUNDLE_FILENAME
in the folderDefaultI18NProvider.BUNDLE_FOLDER
getDefaultTranslationLocales
(ClassLoader classLoader) Check that we have the translation folderDefaultI18NProvider.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 fileDefaultI18NProvider.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 folderDefaultI18NProvider.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 names- Returns:
- List of locales
-
getTranslationFiles
-
getLogger
protected static org.slf4j.Logger getLogger()
-