I explored the events plugin (from https://github.com/pixelandtonic/Events) and I understand the most of that. Now I will try to make the events localized.
The Event itself has no localized field, just the fieldLayout fields. Do I have to save a second record in the event db or did I just have to save the element with the corresponding locale id?
Can you give me a hint what steps are needed that I can edit them in two languages?
So far, I load an existing event
craft()->elements->getElementById($eventId, 'Events_Event', $locale);
with the new locale parameter and create the edit form, putting the locale as hidden field to the form ('de' instead 'en'). The fieldLayout fields are showing the 'de'-icon above the input fields.
When I try to save it, I pass through the locale in the $event variable to
craft()->elements->saveElement($event)
I do not pass it to the $eventRecord
because the $eventRecord itself didn't have a locale.
The event will be saved, just not in 'de' but in 'en'.
Do I have to tell the elementtype or the model that it can be localized to make it work?