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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Forum Module /

Discuss the Forum Module.

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

Forum locale (extension Translatable)


Go to End


3 Posts   1751 Views

Avatar
WebSpilka

Community Member, 89 Posts

29 November 2010 at 2:32am

Edited: 29/11/2010 2:33am

Hi
I use SilverStripe CMS - 2.4.2 with Forum module 0.3-r113106
In my site config I use

Object::add_extension('SiteTree', 'Translatable');
Translatable::set_default_locale('uk_UA');

In folder forum/lang I create file uk_UA.php

<?php
i18n::include_locale_file('modules: forum', 'en_US');

global $lang;

if(array_key_exists('uk_UA', $lang) && is_array($lang['uk_UA'])) {
	$lang['uk_UA'] = array_merge($lang['en_US'], $lang['uk_UA']);
} else {
	$lang['uk_UA'] = $lang['en_US'];
}
............................

But SilverStripe not see my file, connects only English lang file.
Tell me how to make the forum work with my localization?

Avatar
Nivanka

Community Member, 400 Posts

29 December 2010 at 8:25pm

did you do a flush?

Avatar
WebSpilka

Community Member, 89 Posts

29 December 2010 at 9:12pm

yes