The translate plugin works beautifully for editing phrases used within the "CMS" code of the web pages, and for data entered using models.
But I need to keep my "client-users" away from editing code in the CMS, obviously. And using the plugin as documented will result in all my default-language phrases being part of the "off limits" code in my CMS pages.
I have thought of a few solutions but I'm not sure what is best.
1: My CMS pages reference content blocks, and I make my client edit text files / content blocks, because I can create them all and add -langcode to the file names. So they can edit page-title.en.txt and page-title.fr.txt without having to modify {{ 'Page Title'|_ }}.
2: I create a "Placeholder" language, so that both English and French become translations. This would be the best client-user experience, but I'm anticipating a few problems on the front end with a default language that I don't really want anyone to ever see.
3: I create a model for each page, with attributes for each placeholder. This seems like it might work nicely, but it a lot of overhead for development and not very flexible as a CMS.
Any advice?
This makes me curious as well! I talked about that kind of thing here: https://github.com/rainlab/pages-plugin/issues/54#issuecomment-122282112
Like you mentioned: Creating basic page with content block in it, content blocks are named like this: home.fr.htm, home.en.htm so clients can modify those content file without touching the page itself. _The problem: page titles are hardcoded and not translate so the content is localized but not the title._
That's an example of why I think OctoberCMS is still a bit immature for real multiple language websites. Once RainLab.Pages will support Translatable it will get much more interesting.
What we need is a way to switch language on the fly while editing pages/content. Like some plugins do with a EN/FR switch at the end of the fields i.e.
That way, clients with minimum computer skills would be able to understand and play with their content as they wish. Anything else like translating everything via the Translatable plugin's message editor would work but would be a disastrous user experience.
/2cents
Once RainLab.Pages will support Translatable it will get much more interesting.
Agreed. I have implemented by site without using the static pages plugin for this reason. I have _hundreds_ on content partials in use as a result.
One the most complex page layout (the home page), I actually created a model for sections that they can add to the page. Since the model is translatable, this works really well (as you've pointed out about). Just too much coding!
I still cannot believe nothing has been done about this. This definitively prevents developers from using OctoberCMS to build real fully localized websites. We just cannot work with the platform as it is now.
I found a workaround to translate my page titles. Use the message translate feature, i.e. {{ this.page.title|_ }} but for some reason it doesn't get translated. So now I'd have a title translation for my menu manager, another one in the message editor and the real title on the page itself. This isn't a "simple and straightforward" way of working.
Enough bashing, I'd really like to help if I can. I'm about to start another project and this time I'd like to give OctoberCMS a go. Thanks
The fact that we have this issue here for this package, and on Rainlab.Pages plugin shows how unorganized the OctoberCMS localization effort is. https://github.com/rainlab/pages-plugin/issues/32
It really all should be built-in in OctoberCMS from the ground up IMO.
Over a year later, these projects are still a mess. Translation effort have been going on which is great here: https://github.com/rainlab/pages-plugin/issues/32
It seems to work well except for the menus. But there's a workaround that SHOULD work here https://github.com/rainlab/pages-plugin/issues/190#issuecomment-264368919
This issue should be at least closed I guess?
+1
@yesh What are you +1'ing? This issue is resolved. RainLab.Pages menus are still a pain to translate, but that has its own issue on the RainLab.Pages repository.
The last remaining part of this is the simple translation of menu items, which is discussed in https://github.com/rainlab/pages-plugin/issues/190 so I'm closing this issue.