Hello Josh! :)
I'm trying to translate my whole website.
I would like that users could choose the language, but also detect the browser language to select, in a first moment, the web in that language automatically.
The following not work correctly:
public function init() {
parent::init();
if($this->dataRecord->hasExtension('Translatable')) {
i18n::set_default_locale($this->dataRecord->Locale);
i18n::set_locale($this->dataRecord->Locale);
}
}
If I put the following in _config.php:
-----
Translatable::set_default_locale('en_US');
$cu_locale = "es_ES";
i18n::set_default_locale($cu_locale);
i18n::set_locale($cu_locale);
Translatable::set_current_locale($cu_locale);
-----
then all pages are rendered correctly (even the login form), but this not work to do dynamic changes by the user, unless the cookies are used.
I've also seen that the Translatable::choose_site_locale function could be used to these matters, but I think it is not possible to overload.
I have also seen that some texts of the blog widgets are harcoded texts.
It is strange that at this point have not been made appropiate changes to the blog module to fix these problems. Furthermore when it has been a long time since other people had said it.
I really like SilverStripe and I know that it is a open source product, but there are some things that should be corrected more quickly. At least if they wish that SilverStripe comes to the same positions as other CMS's.
I now am a beginner and would like to add my support in the future, but I also think that some things cannot keep without solving months and months, as I have seen when I have begun to study SilverStripe. And this should begin for the base, that's to say, for the SilverStripe company.
I want these words are taken as something constructive. :)
Thank you very much for your attention Josh!! :)
Jose