Package com.almis.awe.developer.service
Class TranslationService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.developer.service.TranslationService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
-
Constructor Summary
ConstructorDescriptionTranslationService
(TranslationServiceFactory translationServiceFactory) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptiongetTranslation
(String literal, String fromLang, String toLang) Extract translation from API resultMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Constructor Details
-
TranslationService
Autowired constructor- Parameters:
translationServiceFactory
- Translation service factory
-
-
Method Details
-
getTranslation
public ITranslationResult getTranslation(String literal, String fromLang, String toLang) throws AWException Extract translation from API result- Parameters:
literal
- LocalefromLang
- Source languagetoLang
- Target language- Returns:
- Locale translated
- Throws:
AWException
- Error translating locale
-