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
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');
statements to my _config.php. This works.
If I add
static $extensions = array(
"Translatable"
);
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.
Kind regards....