Is this the same in trunk?
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.
- Previous 10 entries
- 1
- 2
- Page 33(current)
i just checked out http://svn.silverstripe.com/open/phpinstaller/trunk and tried the same testcase as described before, and just inserted the following lines into mysite/_config.php
Object::add_extension('SiteTree', 'Translatable');
Translatable::set_default_locale('de_DE');
Translatable::set_allowed_locales(array('de_DE', 'en_US'));
i got the same behaviour, it shows "English" in the dropdown-field but showing the german sitetree;
that´s why i commented out this foreach loop where the locales are removed from $usedLocalesWithTitle;
AlexBeka, yes, I have 2.3.3, and I applied the changesets to a Translatable.php as it comes with 2.3.3. (When I used this one Translatable.php?rev=88123 I got the mysql errors as described above about "Locale" / `Locale`)
What is different is that I gave my content manager the permissions:
- Access to Site Content (CMSMain)
- Access to all CMS interfaces
- Access to Files and Images (AssetAdmin)
- Translate into all available languages
Yesterday I had the meeting with the customer and they could edit the content of the German version, no problem, both Languages are shown in the dropdown field.
Can you try with Translate into all available languages? May be that makes the difference.
Otherwise, I remember I had a similar issue as you describe when I misspelled the English locale, using "en_UK" instead of "en_GB".
I looked at http://svn.silverstripe.com/open/modules/sapphire/trunk/core/model/Translatable.php (I assume that's the one you have, AlexBeka ), but I cannot use that version, it has satements such as
- Line 356/357: sprintf( '"%s"."TranslationGroupID" = %d AND "%s"."Locale" != \'%s\'', ....
- Line 516: $qry = sprintf('"%s"."Locale" = \'%s\'', $baseTable, $locale);
- Line 995: $filter .= sprintf(' AND "%s"."Locale" = \'%s\'', $baseDataClass, Convert::raw2sql($locale));
and more like that which seem to result in SQL queries containing WHERE "Whatever"."Locale" = whatever which my MySQL does not like, it would prefer WHERE `Whatever`.`Locale` = whatever.
My server has the latest released MySQL 4.x version, but not yet 5.x, is that the reason? I really hope not, to upgrade that specific server would be a major issue now.
1.) Kalileo, i have the Translatable.php from 2.3.3 branch not from trunk;
you have set the permission-code "Translate into all available languages", i know, that this setting would display then all allowed languages in the dropdown;
but my question was, what happens if you have a translator who should just translate into english and that´s why you give him just the permission to translate into english and not into all languages then this user would see in the dropdown just the english language but he would need also to select the other already existing sitetrees in other languages, like german, to translate these into english;
2.) i testet yesterday the trunk(http://svn.silverstripe.com/open/phpinstaller/trunk) for a short time (adding, translating pages and so on), and had no problems with sql-queries like you described; i am using mysql 5.1.36;
SilverStripe trunk (what will become 2.4) uses "SET sql_mode = 'ANSI'" which makes db abstraction easier, but breaks backwards compatibility with SQL quoting, which now has to be double quotes instead of backticks, hence you can't simply copypaste the whole Translatable.php without modifications to a 2.3.x installation.
- Previous 10 entries
- 1
- 2
- Page 33(current)