Implementing l10n in an extension
rb.henschel at t-online.de
Thu Aug 18 13:26:16 UTC 2016
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.
> 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  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:
> +- Dialog1.xdl
> +- Dialog2.xdl
> +- DialogStrings_de_DE.properties
> +- DialogStrings_en_US.default
> +- DialogStrings_en_US.properties
> +- dialog.xlb
What is "dialogs"? The module name?
> <dlg:button dlg:id="CommandButton1" dlg:tab-index="0" dlg:left="98"
> dlg:top="261" dlg:width="32" dlg:height="10"
> 3. Dialog1.CommandButton1.Label=Schließen
Without blank after 3.
You have to escape special characters
> <library:library xmlns:library="http://openoffice.org/2000/library"
> library:name="dialogs" library:readonly="false"
> <library:element library:name="Dialog1"/>
> <library:element library:name="Dialog2"/>
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.
More information about the LibreOffice