Previous General Totara Learn discussions (read only)

Change block content based on locale

 
? ?
Change block content based on locale
by ? ? - Thursday, 4 May 2017, 3:57 AM
 

Hi,

Block's content in the front page is displayed in English regardless of the system language. 

How can I have it context based behave ? meaning, when the user UI language is English, have it display the links titles in English, and when the user's UI language is different, have it display the links titles in the relevant locale accordingly.


Thanks,

Oded


Craig Eves
Re: Change block content based on locale
by Craig Eves (Totara Support) - Thursday, 4 May 2017, 3:38 PM
Group Totara

Hi Oded

It is possible to add multiple language content by enabling the Multilang text filter and adding content using the multilang tag in the following format (lang is the two letter code of the language pack)

<span lang="en" class="multilang">your_content_in English</span>
<span lang="de" class="multilang">your_content_in_German_here</span>


See https://help.totaralearning.com/display/TL9/Filters for more details

regards

 

? ?
Re: Change block content based on locale
by ? ? - Monday, 8 May 2017, 2:03 AM
 

Hi Craig,

I enabled the Multilang filter, but I don't seem to understand where exactly or how to add the HTML tag. 

The block itself does not have the option for HTML editing. 

What am I missing here ? 

Cheers

Craig Eves
Re: Change block content based on locale
by Craig Eves (Totara Support) - Monday, 8 May 2017, 2:09 PM
Group Totara

Hi Oded

You are correct you will need to add the block content using the HTML editor - adding the HTML block allows this but other blocks dmay not have this unfortunately.

The other blocks will have the content for other languages in the language pack. The content of these can be changed if required through Site Admin > Language > Language customisation.

Select the language pack you want to change and the block 


and change the language under local customisation.


regards