public class TranslationHelper extends Object
| Constructor and Description |
|---|
TranslationHelper() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isTranslationEnabled(JCRSiteNode site)
Calls
TranslationService to check if a site is enabled for online translations |
void |
setTranslationService(TranslationService translationService) |
org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty |
translate(org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty property,
org.jahia.ajax.gwt.client.data.definition.GWTJahiaItemDefinition definition,
String srcLanguage,
String destLanguage,
JCRSiteNode site,
Locale uiLocale)
Calls
TranslationService to translate values of a property. |
List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty> |
translate(List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty> properties,
List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaItemDefinition> definitions,
String srcLanguage,
String destLanguage,
JCRSiteNode site,
Locale uiLocale)
Calls
TranslationService to translate values of a list of properties. |
public List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty> translate(List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty> properties, List<org.jahia.ajax.gwt.client.data.definition.GWTJahiaItemDefinition> definitions, String srcLanguage, String destLanguage, JCRSiteNode site, Locale uiLocale) throws TranslationException
TranslationService to translate values of a list of properties.
The number of calls is minimized : maximum two, one for html values, one for plain texts.
Properties definitions are used to determine if the values are html or plain texts.properties - a list of propertiesdefinitions - the corresponding list of property definitionssrcLanguage - the source language codedestLanguage - the destination language codesite - the siteuiLocale - TranslationExceptionpublic org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty translate(org.jahia.ajax.gwt.client.data.definition.GWTJahiaNodeProperty property,
org.jahia.ajax.gwt.client.data.definition.GWTJahiaItemDefinition definition,
String srcLanguage,
String destLanguage,
JCRSiteNode site,
Locale uiLocale)
throws TranslationException
TranslationService to translate values of a property.
Property definition is used to determine if the values are html or plain texts.property - a propertydefinition - the corresponding property definitionsrcLanguage - the source language codedestLanguage - the destination language codesite - the siteuiLocale - TranslationExceptionpublic boolean isTranslationEnabled(JCRSiteNode site)
TranslationService to check if a site is enabled for online translationssite - public void setTranslationService(TranslationService translationService)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.