It is currently Sat Nov 21, 2026 3:35 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Language-Independent Python Programs Through XML-Based Text Management
PostPosted: Tue Nov 10, 2026 1:45 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Aug 22, 2017
Posts: 78
Supporting multiple languages ​​should not require any changes to the program's functionality for individual languages.

This idea stayed with me for a long time, so I considered how it could be implemented in a simple way. This is my proposal, and I have successfully applied the concept to two of my GIMP2 plugins:
"HN-Pfeil-zeichnen" (HN-Draw-Arrow) and "HN-Form-zeichnen" (HN-Draw-Shape).

If you are interested in the concept, please read the attached PDF file.
Attachment:
File comment: A Concept for GIMP Plugins and Other Python Applications.
Language Independent Python-GIMP-Plugins.pdf [247.87 KiB]
Downloaded 32 times

If you would like to test the described concept, use the ZIP file:
Attachment:
File comment: For your own tests.
Py3SprachunabhängigePlugins.zip [35.02 KiB]
Downloaded 21 times

The concept described was used in the following projects:
- https://gimpchat.com/viewtopic.php?f=9&t=19081
- https://gimpchat.com/viewtopic.php?f=9&t=17084
- https://gimpchat.com/viewtopic.php?f=33&t=22936&p=305977#p305977


Last edited by Herbie on Tue Nov 17, 2026 6:11 am, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Language-Independent Python Programs Through XML-Based Text Manage
PostPosted: Thu Nov 12, 2026 4:16 pm  (#2) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14281
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
Hello, Herbie,

I find this an interesting approach,
and I appreciate the thought you've put into it.
The idea of supporting multiple languages without altering the program makes sense.

It's nice to see members sharing their ideas,
and taking the initiative to develop something that could benefit others in the GIMP community.

Thanks for sharing your work with us!

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Language-Independent Python Programs Through XML-Based Text Manage
PostPosted: Sat Nov 21, 2026 4:21 am  (#3) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 325
And why not use gettext?
That's well established.
And you can use poedit or another translation editor which I find much more comfortable than messing with xml files.


Top
 Post subject: Re: Language-Independent Python Programs Through XML-Based Text Manage
PostPosted: Sat Nov 21, 2026 10:06 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 865
Location: SEA - South East Asia
Thank you, Herbie, for your feedback and for sharing your thoughts. It's always interesting to hear different points of view and approaches.
XML honestly never crossed my mind.

Personally, I use JSON mainly because of its simplicity. It was more or less a natural choice, initially driven by a bit of laziness :rofl , but it turned out to be a very practical one. It's lightweight, easy to read, easy to edit manually, and straightforward to work with Python.
For my project (little size), it does everything I need.

Having said that, I can see the advantages of XML, especially in situations where XML explicit structure or other features might be useful. It's always good to discover approaches you hadn't considered before. :coolthup

_________________
Patrice


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group