Is this the same in trunk?
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
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 [url=http://open.silverstripe.com/browser/modules/sapphire/trunk/core/model/Translatable.php?rev=88123]Translatable.php?rev=88123[/url] 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([url]http://svn.silverstripe.com/open/phpinstaller/trunk[/url]) 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.