> -David
>
>
> On Jul 13, 2005, at 4:40 PM, Jacques Le Roux wrote:
>
> > David,
> >
> > Thanks, your answer, it's completly clear. I tried your
> > recommandations :
> >
> > In "applications/product/config/ProductEntityLabels.properties" file
> > ProductCategory.description.100 = English Gizmos
> > (in _fr)
> > ProductCategory.description.100 = Gizmos en fran\u00E7ais
> >
> > {productCategory.description} as it was before my change in
> > applications/product/widget/catalog/CategoryScreens.xml
> > exactly
> > <label style="head1">${uiLabelMap.${labelTitleProperty}}
> > ${uiLabelMap.CommonFor}: ${productCategory.description}
> > [${uiLabelMap.CommonId}:${productCategoryId}]
> > ${${extraFunctionName}}</label>
> >
> > It's still not working : I get only "Gizmos" and not "Gizmos en
> > français" as
> > expected
> >
> > I get exactly :
> > <span class="head1">Catégorie pour: Gizmos [Réf.:100] </span>
> >
> > As recommended, I send on ML, sorry for the long post folks...
> >
> > Jacques
> >
> > ===============================================
> >
> > Jacques,
> >
> > Syntax errors are no reason to throw out a way of doing things...
> >
> > First, the "productCategory.description.100 = Gizmos" line in the
> > properties file needs to have a capital "P" in ProductCategory, it is
> > case sensitive. I'd also avoid spaces, through they should work.
> >
> > Second, the get("fieldName", locale) method can ONLY be used in FTL
> > files. The string expander in the screen, form, etc files is aware of
> > Maps, Lists, etc, but NOT methods so that won't work there. How are
> > you trying to use it in the screens file? In most cases in the form
> > and screen widgets when you refer to an GenericValue field using the
> > "." syntax to treat it as a Map it will still detect that it is a
> > "LocalizedMap" and it will pass in the locale parameter. So, all you
> > have to do is use "productCategory.description" and it will localize
> > it in the screen and form widgets.
> >
> > BTW, if you are comfortable with it these questions should really go
> > onto the mailing lists. It doesn't solve the problem, but it does
> > tend to reduce the amount of times I have to answer a question.
> >
> > Thanks again for your help on the i18n and l10n efforts, I hope this
> > explanation is understandable...
> >
> > -David
> >
> >
> > On Jul 13, 2005, at 11:54 AM, Jacques Le Roux wrote:
> >
> >
> >> David,
> >>
> >> I tried to use the same scheme, than the one I use in ftl files, in
> >> xml
> >> files (for screen widget rendering) .
> >>
> >> Putting "{productCategory.get("description",locale)" in
> >> <applications/product/widget/catalog/CategoryScreens.xml> after
> >> having
> >> created an <applications/product/config/
> >> ProductEntityLabels.properties> file
> >> with at least "productCategory.description.100 = Gizmos" in it, I
> >> got :
> >>
> >> org.ofbiz.base.util.GeneralException: Error rendering screen
> >> [EditCategory]:
> >> org.ofbiz.base.util.GeneralException: Error rendering screen
> >> [CommonCategoryDecorator]: org.ofbiz.base.util.GeneralException:
> >> Error
> >> rendering screen [main-decorator]:
> >> java.lang.IllegalArgumentException:
> >> [GenericEntity.get] "get("description",locale)" is not a field of
> >> ProductCategory ([GenericEntity.get] "get("description",locale)" is
> >> not a
> >> field of ProductCategory) (Error rendering screen [main-decorator]:
> >> java.lang.IllegalArgumentException: [GenericEntity.get]
> >> "get("description",locale)" is not a field of ProductCategory
> >> ([GenericEntity.get] "get("description",locale)" is not a field of
> >> ProductCategory)) (Error rendering screen [CommonCategoryDecorator]:
> >> org.ofbiz.base.util.GeneralException: Error rendering screen
> >> [main-decorator]: java.lang.IllegalArgumentException:
> >> [GenericEntity.get]
> >> "get("description",locale)" is not a field of ProductCategory
> >> ([GenericEntity.get] "get("description",locale)" is not a field of
> >> ProductCategory) (Error rendering screen [main-decorator]:
> >> java.lang.IllegalArgumentException: [GenericEntity.get]
> >> "get("description",locale)" is not a field of ProductCategory
> >> ([GenericEntity.get] "get("description",locale)" is not a field of
> >> ProductCategory)))
> >>
> >> Do you think that this scheme is usable in xml files, and if yes,
> >> how to
> >> write it ?
> >>
> >> I had a discussion about this subject with Olivier. He told me he
> >> tried also
> >> (I think about march 2005, as I seen some get("description",locale)
> >> in ftl
> >> files) but never succeed.
> >>
> >> Now Néréide has opted for another way and translated in french all
> >> (or most)
> >> of *data.xml files (where we can find Enumeration description for
> >> example).
> >> I know it's not i18n but only l10n. But I think, after have done
> >> the work I
> >> do now on Enumeration Entity, I will use their work and wait
> >> sometime before
> >> coping with other parts of this job...
> >>
> >> What do you think about that ?
> >>
> >> Jacques
> >>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users>