It is currently 10 Jul 2020, 13:37

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

gettext.install: what is it for?

GIMP or GIMP LEARN forum related Questions
Janek
Forum Member

gettext.install: what is it for?

Post#1 by Janek » 08 Mar 2019, 09:33


Hi guys,

Again questioning you for better understanding of python scripts.

I've seen examples in Internet where there is this line at the top:
gettext.install("gimp20-python", gimp.locale_directory, unicode=True)

Is it mandatory to include this line in our script to make it more compatible or is it just optional and more deprecated?
GIMP Learn rocks...
0

tim
GL Blogger

Post#2 by tim » 08 Mar 2019, 22:02


I am not sure but none of my plug-ins has that line and I have never seen it before.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

Janek
Forum Member

Post#3 by Janek » 09 Mar 2019, 13:19


My plug-in works perfectly without it. It is just that I found this line several times in python code for gimp done by others. I have the feeling that it is a way to check that there is python with the right version installed in the gimp local directory.
GIMP Learn rocks...
0

tim
GL Blogger

Post#4 by tim » 11 Mar 2019, 21:30


I searched on the web for anything related to gettext.install, not sure.
But I think you have to install gettext module which doesn't seem at all popular, and it might have to do something with translation.
I guess if you wanted to use it you can install gettext module into GIMP's python but I try to avoid doing anything with a plug-in that requires user to install extra modules into python because most GIMP users won't know about or go out of their way to install a module for GIMP's python.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0


GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests