How to translate the toolbar into multiple languages?

asked 2019-06-09 14:30:42 +0200

Hello dear members of LibreOffice support,

I want to translate an application based on Macros developed in French to include default English for our GNU/Linux distribution.

I've already found how to translate dialog boxes into multiple languages, and have default English: https://help.libreoffice.org/Basic/Tr...

I can not find on the Internet how to have the translation of the text of the icons of a toolbar in English by default, and also in French according to the language selected by the user.

My files for defining the toolbar are called custom_toolbar_XXXX.xml, and are in this format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:uiname="Niveau1 medias">
 <toolbar:toolbaritem xlink:href="vnd.sun.star.script:Standard.Module6.gerer_cadre_image1?language=Basic&amp;location=application" toolbar:text="Ajouter ou modifier une image"/>
 <toolbar:toolbaritem xlink:href="vnd.sun.star.script:Standard.Module6.aggrandir_cadre_images?language=Basic&amp;location=application" toolbar:text="Agrandir l&apos;image"/>
 <toolbar:toolbarseparator/>
 <toolbar:toolbaritem xlink:href="vnd.sun.star.script:Standard.Module6.gerer_fond_ecran?language=Basic&amp;location=application" toolbar:text="Ajouter ou modifier une image de fond "/>
</toolbar:toolbar>

Is it possible to put a language attribute in these files to specify on which language the translation carries?

If not, where can we find the syntax of the toolbar.dtd format?

Thanks in advance for your help.

edit retag flag offensive close merge delete

Comments

  1. This is a questions-and-answers site for LibreOffice users. Yours is about development and you will probably get much quicker answers if you ask at #libreoffice-dev at FreeNode or here.
  2. As far as I can judge, there is no uniform approach to localization. Anaphraseus and OOoFBTools use different ones. Perhaps, contacting their developers will help you.
gabix gravatar imagegabix ( 2019-06-09 22:56:20 +0200 )edit

Thank you Gabix for your advice, and I sent my question to the email address indicated.

Patrick_Emmabuntus gravatar imagePatrick_Emmabuntus ( 2019-06-10 17:43:18 +0200 )edit