Jorge Varela
-
Posts
15 -
Joined
-
Last visited
Reputation Activity
-
Jorge Varela reacted to Meddysong in Hide and show blocks according to language
Yes, that works. It's also a fair bit to type, so in my site I have it in a shorter form:
{{if member.language()->id === 1 }} English {{else}} Esperanto {{endif}} en_US in my site has the id 1. You'll have to adjust your code as necessary.
-
Jorge Varela reacted to Morrigan in Hide and show blocks according to language
You would have to do it at the block/page level because currently there is no way to do it otherwise. You would add something like this around the block @Jorge Varela
{{if \IPS\Member::loggedIn()->language()->bcp47() == 'en-US'}} Block stuff here for English {{endif}} Replacing en-US with the language for the respective block.