Access document generation language in RPE template
Hi,
I use a multilanguage RPE document template within the RTC document builder. The language of the output document reflects the language of the browser (e.g. Chrome). So far, so good. Further, I have some hardcoded strings (generated via scripts) in the RPE document template. How can I switch those strings based on the browser language?
I have searched the language information within the special variable "_sessionInfo" with no luck.
Of course, I could add an additional template variable for the language. But I hope for an automatic solution.
Best Regards
2 answers
_sessionInfo can be used to get details like data source URL, username, etc., not locale details.
Comments
Thanks for the answer. Unfortunately java.lang.System.getProperty("user.language") does not seem to meet my requirement. It does not reflect the OS/browser language. It seems to reflect the server language instead. E.g. the document is generated in German but java.lang.System.getProperty("user.language") gives me “en”.
Is there any way to access the OS/browser language? Basically, the language which is used to generate the document.