Hi Jörg!
Thanks for the answer, but I don't see this behaviour here.
In my frustration, I have been digging down into the code, and there definitely
seems to be a problem.
AFAIK, magnolia supports both a default language (defaultLocale) and a fallback
Language (fallbackLocale).
The defaultLocale has no immediate impact on the storage model. Data from the
default Locale is still stored to nodes properties with the locale suffix
("articleText_de") appended to the name.
The fallbackLocale seems to have an impact on storage: Data from the
fallbackLocale SHOULD be stored without a suffix. (See code in
info.magnolia.cms.gui.i18n.DefaultI18nAuthoringSupport#i18nIze() )
In my case, however, the data from the fallbackLocale ("de") is being stored
with suffix ("de"), while magnolia is storing the English (in my case NEITHER
fallback nor default) content without its correct suffix ("en").
I think I've found the problem.
Regards from Vienna,
Richard
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Jörg Schaible
Gesendet: Freitag, 06. Mai 2011 18:14
An: Magnolia User-List
Betreff: Re: [magnolia-user] i18n Problems
Hi Richard,
On Freitag, 6. Mai 2011, Unger, Richard wrote:
> Hi Magnolians!
>
> I'm having some bizarre problems with i18n, I can't figure it out :-( .
> We're using Magnolia 4.4.2.
>
> We have a site configured for multi-language as follows:
>
> [cid:[email protected]]
>
> AFAIK, this is a "correct" i18n configuration.
>
> Needless to say, all relevant controls have their i18n=true set in the
> dialog configuration.
>
> Now if I want to edit the content using the dialogs, I can edit the
> german version just fine. The german content is stored in nodes
> "articleTitle_de"
> and "articleText_de" (for example). The german content is then
> displayed correctly.
>
> Now if I switch to English, and edit the English content, I get a "blank"
> dialog - all form fields are empty, or with their default values. If I
> enter content into the dialog, it is then saved under nodes "articleTitle"
> and "articleText" (note: no "_en" suffix)!!
>
> When the page renders, the German (fallback) content is displayed,
> presumably because there are no nodes "articleTitle_en" and
> "articleText_en". When I edit the English content again, I see the
> values I entered before (the ones saved under "articleTitle" (no "_en").
>
> If I add a third language to the configuration, french for example, it
> works as expected (as for german).
>
> If I create the English content in the JCR Browser, I can switch
> between the English and the German versions of the site, content is
> rendered in the correct language. If I output
> ${model.site.i18n.locale.language} and
> ${model.site.i18n.fallbackLocale.language} in the template, everything
> looks correct. If I examine the edit-dialog in firebug, the hidden
> fields
> (mgnlSaveInfo) are indeed pointing to the wrong property names when
> editing English (no suffix).
>
> In demo-project, i18n is working correctly.
> For the life of me, I cannot see the difference between my setup and
> that of "demo-project", other than the fact that my default and
> fallback language is "de", while demo-project is "en". But even if I
> change my default and fallback to "en", the behavior is unchanged.
>
> Is this a known issue?
> Have I missed some critical configuration?
I never used the i18n support in Magnolia myself, because I have a different
model in mind, but Magnolia has a "Default Language" in its configuration. The
language suffix is never appended for the default.
- Jörg
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------