FLTK logo

Re: [fltk.coredev] STR 3289: i18n and Fluid, does anyone use cross platform internationalisation?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: STR 3289: i18n and Fluid, does anyone use cross platform internationalisation? Albrecht Schlosser Dec 10, 2021  
 
On 12/10/21 2:01 AM 'melcher....@googlemail.com' via fltk.coredev wrote:
Looking at STR 3289, I don't know much about adding another language to an app, neither with POSIX catguts, nor GNU gettext. Both seem to be in use, but can anyone give me a hint on how these are applied across our supported platforms?

Neither do I but I have had to add translations to a web site which used i18n in a similar way.


The most obvious thing to prove that Fluid can do i18n would be a German version of Fluid, however, I assume, libraries need to be installed, and breaking the Fluid build process is the last thing I want to do.

I don't think that the fluid build process would be affected in any way for implementation of this feature for users. But yes, translations of fluid itself would require additional libs and introduce dependencies. Fluid translation would be too much work. IIRC you need to change the source code to "mark" all strings that are subject to translation, e.g. change "YES" to _("YES") or something like that. A simple example project would be much more helpful.

Actually '_' is a name of a function that is called to translate the text "YES" to "JA" in German.

This translation is based on translation tables that map the original English text to any other language. This is done with external file types .po and .mo.

There's a commandline tool named xgettext ("Extract translatable strings from given input files.") whose manpage might be a start to learn what's going on. I forgot much of it again since I checked that.

I believe the "write strings" menu in Fluid is related.

What you would do (AFAICT) in a real application is:

(1) extract all translatable strings out of the source files (and somehow .fl files or the written "strings" too), likely using xgettext.

(2) build a translation table (.mo or .po, don't know) for any language

(3) anybody may edit the translations for their particular language

(3a) I'm not sure if these translations must be "compiled" in any way.

(4) the program accesses the translation table at startup and whenever a source string needs to be translated.


This is a high level (low knowledge) description of what I learned about this issue.

I'm not sure how useful the file 'test-xgettext.fl' posted by Nikita Egorov (aka Nikego) is. I gave up.

I wish you good luck and success!

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/9fd45f3f-5b82-ce2b-ae5b-a98ac15443da%40online.de.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.