Den sön 10 maj 2020 kl 22:26 skrev jean-francois < jean-francois.nifenec...@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+unsubscr...@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+unsubscr...@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