[answered] about cms_set_language in combination with news

Post Reply
deactivated010521

[answered] about cms_set_language in combination with news

Post by deactivated010521 »

Rev: 8101

Currently I am testing the new cms_lang tags. They seem to work pretty well, nice addition.

I have set the default front-end language to en_US later I set the language to nl_NL. {$nls->key()} is printing the right values.

Code: Select all

{cms_lang_info assign='nls'}
key: {$nls->key()} <br>
fullname: {$nls->fullname()} <br>

<!-- cms_set_language -->
{cms_set_language lang="nl_NL"}
<!-- /cms_set_language -->

{cms_lang_info assign='nls'}
key: {$nls->key()} <br>
fullname: {$nls->fullname()} <br>

<b>Give me the nl_NL news version</b>
{news action=fesubmit}

Code: Select all

key: en_US
fullname: English
key: nl_NL
fullname: Dutch 
By using {cms_set_language lang="nl_NL"} at last I suppose I am in 'Dutch' mode but when I call the news tag I get the 'en_US' translations.

How can I get the 'Dutch' translation by using the news tag. Since (optional) lang="..." is deprecated.

Changing the front-end language is obvious but for mulilang sites there can be multiple front-end languages.
Last edited by deactivated010521 on Sun Jun 24, 2012 2:30 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Question about cms_set_language in combination with news

Post by calguy1000 »

The NLS/lang stuff will not support changing the language (and therefore the NLS codes and everything else) multiple times in the same page.

One call per request.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
deactivated010521

Re: Question about cms_set_language in combination with news

Post by deactivated010521 »

Ok thank you for the feedback. Setting the default frontend language to en_US and switching once works great.

Code: Select all

<!-- cms_set_language -->
{cms_set_language lang="nl_NL"}
<!-- /cms_set_language -->

{cms_lang_info assign='nls'}
key: {$nls->key()} <br>
fullname: {$nls->fullname()} <br>

<b>Give me the nl_NL news version</b>
{news action=fesubmit}
Post Reply

Return to “Closed Issues”