[opencms-dev] Locale macro in XSD schema

Arturo Martín Lladó arturo.martin.llado at gmail.com
Fri Feb 15 16:49:25 CET 2013


Hi, Rüdiger.

I tried with this:

           <resourcebundles>
                <xmlbundle name="element.workplace.xml">
                    <bundle locale="ca">
                        <resource key="package.element.language">ca</resource>
                    </bundle>
                    <bundle locale="es">
                        <resource key="package.element.language">es</resource>
                    </bundle>
                </xmlbundle>
            </resourcebundles>

The value stored in %(key.package.element.language) is displayed OK in
the default values of OpenCmsString fields, but it seems to be ignored
in the attribute "configuration" of a CategoryWidget.

Is this the expected behaviour? Maybe macros are not processed in
<layout> elements?

Kind regards.

2013/2/15 Rüdiger Kurz <r.kurz at alkacon.com>:
> Hi,
>
> it's me again. You can access localized message bundles with:
> %(key.your.label)
>
> imagine a XSD:
>
> <resourcebundle name="your.package.workplace"/>
> [...]
> <layout element="Elem"
>         widget="CategoryWidget"
>         configuration="... %(key.language) ..." />
>
> and a workplace_en.properties
> containing:
> language=en
>
> and a workplace_de.properties
> containing:
> language=de
>
> This should do the trick.
>
> regards
> Rüdiger
>
>
> Am 15.02.2013 14:39, schrieb Rüdiger Kurz:
>
>> sorry not quiet sure if this works inside the XSD, but inside the
>> content editor you can use it.
>>
>> Am 15.02.2013 14:37, schrieb Rüdiger Kurz:
>>>
>>> yes, %(request.locale)
>>>
>>> Am 15.02.2013 14:27, schrieb Arturo Martín Lladó:
>>>>
>>>> Hi, list.
>>>>
>>>> Is there available any locale macro for using it in XSD schemas?
>>>>
>>>> I'd like to do something like this:
>>>>
>>>>     <layouts>
>>>>                  [...]
>>>>                  <layout element="Categoria" widget="CategoryWidget"
>>>>
>>>> configuration="category=/_categories/__LOCALE_MACRO___/tipoDocumento/|onlyleafs=true"/>
>>>>
>>>>
>>>>     </layouts>
>>>>
>>>> This is because our categories tree is organized this way:
>>>> /sites/default/_categories/__LOCALE__/...
>>>>
>>>> Kind regards.
>>>>
>>>
>>
>
> --
> Kind Regards,
> Rüdiger.
>
> -------------------
>
> Rüdiger Kurz
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>



-- 
Arturo Martín Lladó



More information about the opencms-dev mailing list