Package sk.iway.iwcm.i18n
Class Prop
java.lang.Object
sk.iway.iwcm.i18n.Prop
Description of the Class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
static final boolean
static final String
Description of the Field -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears all missing textsstatic void
deleteMissingText
(String key, String lng) Delete missing text by key and languagestatic IwayProperties
getChangedProperties
(String language) Vrati texty zmenene pouzivatelom pre zadany jazyk.static IwayProperties
getChangedProperties
(String language, String prefix) Vrati texty zmenene pouzivatelom pre zadany jazyk a prefix.static IwayProperties
getDefaulProperties
(String languageKey, String fileLng, javax.servlet.ServletContext servletContext) nacitanie len default textov pre jazykstatic Prop
static Prop
getInstance
(boolean refresh) Obnovi instanciu Prop objektu ak je refresh nastavene na truestatic Prop
getInstance
(String lng) static Prop
getInstance
(javax.servlet.http.HttpServletRequest request) static Prop
getInstance
(javax.servlet.ServletContext servletContext, String lng, boolean refresh) static Prop
getInstance
(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request) Gets the text attribute of the Prop classstatic Prop
getInstance
(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpSession session) static String
getLng
(javax.servlet.http.HttpServletRequest request, boolean noParameter) static String
getLng
(javax.servlet.http.HttpSession session) static String
getLngForJavascript
(javax.servlet.http.HttpServletRequest request) Vrati jazyk pre JS subory pre ckeditor, elfinder a podobne kde sa napr.static Set<MissingKeysDto>
returns set of missing texts for ALL language'sstatic Set<MissingKeysDto>
getMissingTexts
(String lng) returns set of missing texts for language paramGets the text attribute of the Prop objectgetText
(String key, String param1, String param2, String param3, String param4, String param5, String param6) getText
(String key, String param1, String param2, String param3, String param4, String param5, String param6, String param7) getTextProp
(String key) getTextStartingWith
(String prefix) getTextWithParams
(String key, String... params) getTextWithSuffix
(String key, String suffix) static String
Staticke ziskanie prekladoveho textu ked nemam request ani session, zvoli naposledy pouzity jazykboolean
sortByValue
(Map<String, String> texts)
-
Field Details
-
DEFAULT_TEXTS
public static final boolean DEFAULT_TEXTS- See Also:
-
CURRENT_TEXTS
public static final boolean CURRENT_TEXTS- See Also:
-
SESSION_I18N_PROP_LNG
Description of the Field- See Also:
-
-
Constructor Details
-
Prop
-
-
Method Details
-
getInstance
-
getInstance
public static Prop getInstance(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpServletRequest request) Gets the text attribute of the Prop class- Parameters:
servletContext
- Description of the Parameterrequest
- Description of the Parameter- Returns:
- The text value
-
getInstance
-
getLng
-
getLng
-
getLngForJavascript
Vrati jazyk pre JS subory pre ckeditor, elfinder a podobne kde sa napr. pre CZ pouziva hodnota CS- Parameters:
request
-- Returns:
-
getInstance
public static Prop getInstance(javax.servlet.ServletContext servletContext, javax.servlet.http.HttpSession session) -
getInstance
-
getInstance
Obnovi instanciu Prop objektu ak je refresh nastavene na true- Parameters:
refresh
-- Returns:
-
getInstance
-
getText
Gets the text attribute of the Prop object- Parameters:
key
- Description of the Parameter- Returns:
- The text value
-
getText
-
getText
-
getText
-
getText
-
getText
-
getText
-
getText
-
getTextWithParams
-
getTextStartingWith
-
sortByValue
-
sortByKey
-
getTextWithSuffix
-
getTxt
Staticke ziskanie prekladoveho textu ked nemam request ani session, zvoli naposledy pouzity jazyk- Parameters:
key
-params
-- Returns:
-
getTextProp
-
getProperties
-
getRes
-
getDefaulProperties
public static IwayProperties getDefaulProperties(String languageKey, String fileLng, javax.servlet.ServletContext servletContext) nacitanie len default textov pre jazyk- Parameters:
languageKey
-fileLng
-servletContext
-- Returns:
-
getChangedProperties
Vrati texty zmenene pouzivatelom pre zadany jazyk. Vracia ich ako zoznam vo forme Kluc => hodnota.- Parameters:
language
-- Returns:
-
getChangedProperties
Vrati texty zmenene pouzivatelom pre zadany jazyk a prefix. Vracia ich ako zoznam vo forme Kluc => hodnota.- Parameters:
language
-prefix
-- Returns:
-
shouldBeUpdated
public boolean shouldBeUpdated()- Returns:
- Returns the lastUpdate.
-
getMissingTexts
returns set of missing texts for language param- Parameters:
lng
-- Returns:
-
getMissingTexts
returns set of missing texts for ALL language's- Returns:
-
clearMissingTexts
public static void clearMissingTexts()Clears all missing texts -
deleteMissingText
Delete missing text by key and language- Parameters:
key
-lng
-
-