Is there a way to get Language name that partner is chosen in rml report? In code I only saw you can get language codes, like
en_US. But what if I need to just return name of the Language (like
English)? Didn't see that there are any relations with
res.lang object. Maybe there is some work around? Or the only way is to customize the module?
You can try something like this:
[[ ( o.partner_id.lang == 'en_US' ) and 'English' or 'OtherLang' ]]
<para>[[ ( o.partner_id.lang == 'en_US' ) and 'English' or removeParentNode( 'para' ) ]]</para> <para>[[ ( o.partner_id.lang == 'fr_FR' ) and 'FranÃ§ais' or removeParentNode( 'para' ) ]]</para> ...
This one is more suited if you have more than 2 languages.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/4/13, 8:49 AM|
|Seen: 1481 times|
|Last updated: 3/16/15, 8:10 AM|