Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

get all translations from a specific namespace


Go to End


2 Posts   967 Views

Avatar
joern

Community Member, 28 Posts

15 March 2012 at 8:41am

Edited: 15/03/2012 8:42am

hi,
i would like to get all translations from a specific namespace. for example:

_t('LeftAndMain.HELLO','Site content',PR_HIGH,'Menu title');
_t('LeftAndMain.FILESIMAGES','Files & Images',PR_HIGH);
_t('LeftAndMain.NEWSLETTERS','Newsletters');

my getLocale('LeftAndMain') function would return:

array(
'HELLO' => 'Site content'
'FILESIMAGES' => 'Files & Images',
'NEWSLETTERS' => 'Newsletters',
);

something like that…

how can i access the $lang variable in my Controller?

thanks
Joern

Avatar
swaiba

Forum Moderator, 1899 Posts

16 March 2012 at 12:05am

how about...

global $lang;
print_r($lang);
die();