As a test I created a page with three different languages:
https://ecommerce2.laraship.com/langtest
containing: langtest en, langtest br and langtest en
If change the language with:
https://ecommerce2.laraship.com/set-locale/pt-br
only the english language is ever displayed.
How to enable different languages for the frontend pages?
Thanks
Hello,
I see your point, this is related to getRendereContent function at content.php
a simple fix will be at Corals/modules/CMS/Models/Content.php
Replace line 88
$content = $this->attributes['content'];
with
$content = $this->getAttributeValue('content');
will push the fix to our update server in few mins :)
Thanks fo pointing that
Fixed corals-cms version: 1.9.1
Hello,
this issue was dude to CKEDITOR was not supporting Localization however this should be working fine now, and it has been added in the new released
and you can check the demos again.
Best,
Laraship Support
No I saw the bug report about the editor – this one is for displaying the language content in the frontend without being logged in.
I found a solution though – I had to add the following to Corals/modules/CMS/Traits/CMSControllerFunctions.php :
public function show(Request $request, $slug = ”) {
….
….
$item = $item->toContentType();
$locale = app()->getLocale();
foreach ($item->getAttributes() as $attribute => $value) {
if ($item->isTranslatableAttribute($attribute)) {
if ($item->hasTranslation($locale, $attribute)) {
$item->setAttribute($attribute, $item->getTranslation($attribute, $locale));
}
}
}
…
…
}
Thanks. But what’s about the other attributes like title, meta_keywords & meta_description?
Please login or Register to submit your answer