Implementing l10n in an extension

Regina Henschel rb.henschel at
Thu Aug 18 13:26:16 UTC 2016

Hi Katarina,

Katarina Behrens schrieb:
> Hello world,
> I've implemented a Calc extension that includes some dialogs and I'd like to
> have those translated to multiple languages. The dialogs are implemented in
> this funny .xdl Basic format, the handlers in Java.
> However, as you might've already expected ;) l10n didn't quite work out so
> far. No matter what I do, I can't get localized strings displayed. Instead of
> English or German strings, I see only the references e.g.
> "&3.Dialog1.CommandButton1.Label"
> It has certainly something to do with the fact that I've created l10n files
> manually, since GUI for that is currently completely defunct due to [1] so if
> anyone can spot an obvious mistake, something missing etc. in my data below
> and/or give me some useful advice, I'd be grateful

Make sure, that the files *.properties are included in the finished 
extension. If not, copy&paste them manually.

> My folder structure:
> dialogs/
>    +- Dialog1.xdl
>    +- Dialog2.xdl
>    +-
>    +- DialogStrings_en_US.default
>    +-
>    +- dialog.xlb

What is "dialogs"? The module name?

> Dialog1.xdl:
> <dlg:button dlg:id="CommandButton1" dlg:tab-index="0" dlg:left="98"
> dlg:top="261" dlg:width="32" dlg:height="10"
> dlg:value="&3.Dialog1.CommandButton1.Label">
> 3.Dialog1.CommandButton1.Label=Close
> 3. Dialog1.CommandButton1.Label=Schließen

Without blank after 3.
You have to escape special characters
ß   \u00df

> dialog.xlb:
> <library:library xmlns:library=""
> library:name="dialogs" library:readonly="false"
> library:passwordprotected="false">
>   <library:element library:name="Dialog1"/>
>   <library:element library:name="Dialog2"/>
> </library:library>

Are you sure about the value of library:name? If I use the Basic Macro 
Organizer, it is the name shown in the list "Library" in tab "Libraries".

Do you have used an own module? You cannot do it in Module "Standard".

I would do a mini test in AOO or a very old LO to be sure about the 
needed structure, and then add the missing parts manually.

Kind regards

More information about the LibreOffice mailing list