• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [answered] about cms_set_language in combination with news
PostPosted: Sun Jun 24, 2012 1:17 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1372
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:
{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:
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.

_________________
The CMSMS Builder is a tool to help you develop and optimize CMS Made Simple >= 2.2.3 themes, it is made by a developer for developers.

I you like an automated file based work-flow this project might be for you. It is usable to kick-start a new CMSMS project or it can be applied to existing ones.


Last edited by arnoud on Sun Jun 24, 2012 2:30 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Question about cms_set_language in combination with news
PostPosted: Sun Jun 24, 2012 2:24 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8144
Location: Fernie British Columbia, Canada
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Question about cms_set_language in combination with news
PostPosted: Sun Jun 24, 2012 2:29 pm 
Offline
Power Poster
Power Poster

Joined: Sun Apr 19, 2009 9:33 am
Posts: 1372
Ok thank you for the feedback. Setting the default frontend language to en_US and switching once works great.

Code:
<!-- 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}

_________________
The CMSMS Builder is a tool to help you develop and optimize CMS Made Simple >= 2.2.3 themes, it is made by a developer for developers.

I you like an automated file based work-flow this project might be for you. It is usable to kick-start a new CMSMS project or it can be applied to existing ones.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting