Hi,
It works fine with adding slides and all. But when I try to edit the title or the caption, it doesn't work for my local language. I am keeping English as default Locale. But when I switch to my local language and try to update, it does say that the slide is updated, but the changes are not saved.
Please help
Azmee
That would be great.. have been going through your code over and over again for the past few hours and I still can't seem to figure out why. Looking forward to your response tomm.. thanks :)
Actually, I'm thinking to something, I'm not sure to be able to solve that without setting the "translate-plugin" as a dependency...
What you can probably do, is to surcharge the default template :
https://github.com/flo-sch/slideshow-plugin/blob/master/components/slideshow/default.htm
In your own theme files : /themes/{your-theme}/partials/Slideshow/default.htm
And add the corresponding translation tag for every fields you need to translate :
{{ slideshow.lang('your-locale').title }}
I'll still investigate tomorrow as I am not sure to be 100% aware of how the translate-plugin should be used.
Hi Flosch,
Thank you for ur reply.
Like I said, everything is working fine with creating new slides (with all languages). The issue is only when updating the slides. Can update English title and description but it doesn't save changes on my local language.
I am aware of the default.htm edits. I did have to edit it a bit to make the English fields work too.
For you info, I am using Rainlabs Translate plugin. I extended your plugin by adding the following lines to the Slide class in models/Slide.php
/**
* Softly implement the TranslatableModel behavior.
*/
public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
/**
* @var array Attributes that support translation, if available.
*/
public $translatable = [
'name',
'description'
];
This would enable a lang switch at the right top corner of the data fields on entry forms.
Hi aazmee, sorry for the mistake, I misunderstood your problem.
The thing is, I'm implementing RainLab translate-plugin as-well for the translation, but it does not seem to work for me neither.
I have the language switcher on the top-right of the corresponding fields, but can't update their values... Did you succeed to make it work for the slides titles and description?
This seem to be related to the translate-plugin itself at the moment : https://github.com/rainlab/translate-plugin/issues/65
Hey thanks. Am taking a look there. And yea, I managed to integrate it with translate plugin. The only issue is that i cant edit any existing entry. (Can edit in English only). So as long as I add n delete its working fine. Just cant edit local lang. I managed to integrate the translate plugin with rainlab blog module. Same issue was there for a while. But somehow, blog plugin is working fine now with both languages. The only thing i did different with blog plugin was to change the markdown editor to redactor editor. Did the same with yours, but no success yet. :(
Yeah I got your problem, I have the same issue here. But I do not think it is related to the Rich-Text Editor, because the "name" property is just a simple text input, and has no RTE...
However, I'll try to see what's the difference in the blog plugin!
Hey Flosch. Just merged airponce's source and it's working now. Am comparing the versions now. :)
Great to hear! I would really prefer to let RainLab merge the PR themself in the translate-plugin actually, but I will see if I can find a quicker solution otherwise :)
Same issue exists in my project too. updation of title and caption not working. which code should i replace from airponce's library? Can anyone help?
1-12 of 12