10704 Posts in 2385 Topics by 1763 members
|Go to End|
25 July 2012 at 2:34am
Hello everyone !
Is there any way to get translation to work in silverstripe 3.0 yet ?
I have tried the latest snapshot of the "translatable" from github. It works to some degree but it has a few issues and unfortunately completely fails at the most important part: displaying the translated page. Despite a dozen db rebuilds (no errors) and following several recipes from the module documentation or other guides that are findable over google I am unable to get this to work.
When the translated pages are requested, they come up without the page theme being applied and the note "Generated with the default ContentController.ss template". This happens independent of the selected theme.
I have added the
statements to my _config.php. This works.
If I add
static $extensions = array(
to my Page.php instead I am getting database errors when the webpage is being accessed:
[User Error] Couldn't run query: SELECT DISTINCT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "RawPage_Live"."RawContent", CASE WHEN "SiteTree_Live"."ClassName" IN ('SiteTree', 'Page', 'RawPage', 'ErrorPage', 'RedirectorPage', 'VirtualPage') THEN "SiteTree_Live"."Locale" WHEN "SiteTree_Live"."ClassName" IN ('Page', 'RawPage', 'ErrorPage', 'RedirectorPage', 'VirtualPage') THEN "Page"."Locale" ELSE NULL END AS "Locale", "SiteTree_Live"."ID", CASE WHEN "SiteTree_Live"."ClassName" IS NOT NULL THEN "SiteTree_Live"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_Live"."Sort" FROM "SiteTree_Live" LEFT JOIN "RawPage_Live" ON "RawPage_Live"."ID" = "SiteTree_Live"."ID" WHERE ("RawPage_Live"."ID" = 3) AND ("SiteTree_Live"."ClassName" IN ('RawPage')) ORDER BY "SiteTree_Live"."Sort" ASC LIMIT 1 Unknown column 'Page.Locale' in 'field list'
I also found a posting here in the forum advertising another module which would do the job, but the authors decided to make 3.0 support a pay-feature with a 3-digit price (which is the reason why I am not making this another ad-posting by mentioning the name).
Any help would be appreciated.
25 July 2012 at 3:25am Last edited: 25 July 2012 3:26am
I'd like to know this to! I'm currently busy with a site where page translation is essential. Translatable gives me nothing but a error message 'The action 'LangForm' does not exist in class CMSPagesController'...
25 July 2012 at 1:10pm
Just a little update on my progress.
I was able to solve my problem of translated pages not having the correct themes being applied. This was fixable by directly patching the "theme" field of the database siteconfig table. The current translatable module has obviously no mechanism to properly configure this field.
But before anyone gets too excited... this combination of SS3.0 and translatable is still completely unusable for me (and most likely everyone else).
1) It is completely impossible to edit the URL segment... attempt to touch it once and you have to go to the database editor again to correct it
2) The CMS UI needs a hard browser reload VEEEERY often to get the page tree back into a consistent and usable state after attempting to switch between languages or after creating a new translation
3) If you edit a link on a translated page, the link always seems point at the original page (a german page should probably link to another german page if there is one... but this is impossible to select. I can only link to original pages, which are english in this case.).
4) The "Create new translation" page on the settings/translations tab seems to to nothing
In general... if you are unwilling to
- waste man-days to dig through (for me undecipherable masses of) php code
- manually patch the database
or the other way around... if you depend on something that more or less works out of the box then do yourself a favor and avoid SS3.0 for a multilingual site. It does not work (yet) at all.
To be honest... after wasting a full working day on getting this to work somehow, I even think about entirely replacing SS by something else where these problems have been dealt with already. I am very frustrated right now. For something with a 3.0 version tag where this supposedly already worked in a previous version it is a huge disappointment to see that a critical core feature like multilanguage support is so horribly broken. The fact that translation is only supposed to be discussed under "all other modules" instead of its own forum section should probably have been warning enough.
|Go to Top|