Page 1 of 1

Changing the language of the modules

Posted: Wed Apr 03, 2013 12:01 pm
by urheat
I think the answer is pretty simple, but I just don't figure it ;)

I have used and can still use string: lang="en_US" even though it's deprecated.

But what is the proper way? I have multilingual site and for example if I want to use Formbuilder forms on the same site both in Finnish and English - how can I do it?

Question 2:
If lang='en_US' is deprecated. Can I still use it? Will it work for how long?

Re: Changing the language of the modules

Posted: Wed Apr 03, 2013 2:07 pm
by calguy1000
The lang= parameter is already removed from CMSMS 2.0 (in development). So the last series that it will work in is 1.11.x

The direct replacement for this is {cms_set_lang} which can be called only once per request. I suggest you place it in your page template above the <__html> tag or at the very least the top of the </__body> section.

Re: Changing the language of the modules

Posted: Wed Apr 03, 2013 2:28 pm
by urheat
calguy1000 wrote:The lang= parameter is already removed from CMSMS 2.0 (in development). So the last series that it will work in is 1.11.x

The direct replacement for this is {cms_set_lang} which can be called only once per request. I suggest you place it in your page template above the <__html> tag or at the very least the top of the </__body> section.
Thanks Calguy!

I tried that. My template starts with:

Code: Select all

{cms_set_language lang="en_US"}
{cms_get_language} {* just for checking *}
{process_pagedata}<!DOCTYPE HTML>
And yes it worked fine with for example News-module. I just tried the Formbuilder-module and thought this was a core thing, but obviously this has something to do with Formbuilder-module.