AnsweredAssumed Answered

AppListStrings language

Question asked by Bernhard Leitgeb on Oct 28, 2016
Latest reply on Oct 31, 2016 by Bernhard Leitgeb

Hello dear sugar Community!

 

I am writing a custom expression in Sugar for returning translated app list strings.

 

The PHP part of my code is working. I am using:

 

$lang = $params[2]->evaluate();
$app_list_strings = return_app_list_strings_language($lang);

 

 

But i have problems with the Javascript part of my code:

 

 

var lang = params[2].evaluate();
this.context.updateLanguage(lang);
var arr = this.context.getAppListStrings(list);

 

 

the updateLanguage part of it is not working. 

 

($)lang gives me the language key like "en_us"

 

Is there another way to set the language for app list strings in javascript?

 

Thank you!

Outcomes