diff --git a/README.md b/README.md index 69d150fb..cb21f621 100644 --- a/README.md +++ b/README.md @@ -220,11 +220,16 @@ or by defining the subsiteCMSShowInMenu function in your admin: ### Using Subsites in combination with Fluent -When using Subsites in combination with Fluent module, the Subsites module sets the i18n locale to the language defined in the current Subsite. When this behaviour is not desired and you need to use the locale in FluentState use the following setting in your yml config file: - -```yaml - SilverStripe\Subsites\Extensions\SiteTreeSubsites: - ignore_subsite_locale: true +When using Subsites in combination with Fluent module, the Subsites module sets the i18n locale to the language defined in the current Subsite. When this behaviour is not desired and you need to use the locale in FluentState you can set the current Fluent locale in your PageController like this: + +*PageController.php* +```php + protected function init() + { + if ($this->dataRecord->SubsiteID !== 0){ + i18n::set_locale(FluentState::singleton()->getLocale()); + } + } ``` ### Public display of a subsite