Dashboard Block Visibility - Filter by language?

Dashboard Block Visibility - Filter by language?

by Tay Moss -
Number of replies: 2
I'm already using a plugin to make blocks in a course visible or hidden based on the user's language. That works great in combination with the other language filter tools.

Question: does anyone know a way to set the visibility of block on the dashboard based on the user's language?
Average of ratings: -
In reply to Tay Moss

Re: Dashboard Block Visibility - Filter by language?

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Tay,

Do you really need different blocks for different languages or do you need blocks to have different content for different languages?

If it is the latter, take a look at the {mlang} tags from the Multi-Language Content v2 filter plugin. This tag enables you to include content in multiple languages in most places in Moodle including courses and block and even in many settings. See https://moodle.org/plugins/filter_multilang2

If you are already using the FilterCodes plugin, you can alternatively use the {multilang} tag. It works in a similar way to the {mlang} tags but uses the core Multi-Language Content filter instead. See https://moodle.org/plugins/filter_filtercodes

Hope you find this information useful.

Best regards,

Michael Milette
Average of ratings: Useful (1)
In reply to Michael Milette

Re: Dashboard Block Visibility - Filter by language?

by Tay Moss -
Hi, Michael!

In this case, yes, actually, I need different blocks for different languages. I created a whole custom catalog system, which works really well. One of it's features is a block for the dashboard that can diplay different items from the catalog. For example, the 10 most recent course, free courses, or couses that have been tagged with certain keywords. The items in the catalog already have a "language" attribute, and we can use that as the criteria for the what is shown in this catalog block, so we can make it show only Spanish language courses. So it would make sense that if the block is configured to show catalog items with that attribute, that the block only be visible to people with that language set.