Hello.
We are making an app that is sending push notifications via Modx. We handle all our internationalization using lexicons. It worked perfectly up to right about now because we have a case where we have to load multiple changes when pushing the notifications, and parsing the message based on the language for each user.
Say user1 has lang = no and user2 has lang = en.
How to you make it possible to send fetch lexicon entries for both languages and then get the matching string? When I try to use it in my snippets, it always defaults to english.
// Loading
$modx->getService('lexicon', 'modLexicon');
$modx->lexicon->load('lang:notifications');
// Trying to parse (does not work)
$msg = $modx->lexicon('lang.title_newmessage', array('language' => $user_language));