Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


Den sön 10 maj 2020 kl 22:26 skrev jean-francois <
jean-francois.nifenecker@laposte.net>:

Hi Johnny,

Le 10/05/2020 à 14:35, Johnny Rosenberg a écrit :
I'm playing a little with macros (my level is probably one step or two
above beginner) and making extensions out of them. I found a few examples
online and I got it to work.

I don't know if I'm going to share anything in the future (because I
don't
think my extensions will fulfil anyone else's needs than my own and they
are probably poorly written anyway), but if I want to do that, there's a
minor problem: My macros interact with the user (usually me) in Swedish,
and I guess it would be a good idea to at least write an English version
for sharing with others.

However, it would be nice if the extension adapts to the user's locale
when
installed (and falls back to English when the user's locale is not
available, that is in most cases). Is that possible? A link to some guide
of some sort would be appreciated. I found nothing so far.

IMO, as English is the lingua franca of IT, writing *any* code should
always be done in English (including comments). Using any other language
leads to what you're experiencing: no one will read the code, other than
a native.

As for user's interactions, yes, a translation into English could be of
use.


And that's all I want to do, a translation to the user's language. I never
intended to translate my comments or anything else to Swedish, except
things that directly communicates with the user, such as the MsgBox command
and the Print command.
I guess that if I can't have those translated, I could always replace them
with custom dialogues, but it seems a little bit like ”isn't there an
easier way?”.


Kind regards

Johnny Rosenberg



I'm using po files with a Basic adapted gettext() function I had
written for that (well, it's a little more convoluted but you get the
idea).

https://www.gnu.org/software/gettext/
https://www.gnu.org/software/gettext/manual/gettext.html

My 2 (euro)cents.

Best,
--
Jean-Francois Nifenecker, Bordeaux


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.