Global area and auto nav
Permalink Browser Info Environment
Hi.
How to translate the language in global areas and auto nav?
I had found posts about it, but not a concrete solution ..
Any advice?
How to translate the language in global areas and auto nav?
I had found posts about it, but not a concrete solution ..
Any advice?
Type: | Discussion |
---|---|
Status: | In Progress |
Can you give me a little guide on how I set it up?
I upload multilingual_text.php and template.php to /helpers directory.
and then I make the number of global areas, header_en_EN / header_fr_FR in concrete5 ?
I upload multilingual_text.php and template.php to /helpers directory.
and then I make the number of global areas, header_en_EN / header_fr_FR in concrete5 ?
Step1: Upload multilingual_text.php to /helpers directory.
Step2: Change your code like below
From:
To:
Then, you will get 'Header' area in English tree, and 'Header Da DK' in Danish tree.
Note: Before I write this comment, I've found a bug on the gist code. It was already fixed. sorry.
Step2: Change your code like below
From:
$a = new GlobalArea('Header'); $a->display();
To:
$mt = Loader::helper('multilingual_text'); $a = new GlobalArea($mt->getMultilingualAreaName('Header')); $a->display();
Then, you will get 'Header' area in English tree, and 'Header Da DK' in Danish tree.
Note: Before I write this comment, I've found a bug on the gist code. It was already fixed. sorry.
So cool :) thanks, it works perfectly.
Hi, I'm trying to follow these instructions but I think the code has changed since you posted this. Would you mind posting an update? Thanks!
https://gist.github.com/hissy/7396557...