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?

Type: Discussion
Status: In Progress
Resonate
View Replies: View Best Answer
hissy replied on at Permalink Best Answer Reply
hissy
Usually I divide area name based on multilingual site tree.

https://gist.github.com/hissy/7396557...
Resonate replied on at Permalink Reply
Resonate
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 ?
hissy replied on at Permalink Reply
hissy
Step1: Upload multilingual_text.php to /helpers directory.

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.
Resonate replied on at Permalink Reply
Resonate
So cool :) thanks, it works perfectly.
GeoAlliance replied on at Permalink Reply
GeoAlliance
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!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.