Change language
- anli
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
15 May 2021 18:36 #208951
by anli
Change language was created by anli
Hi *,
I'm using gmoccapy 3.1.3.6 on a german linux. I want to change the language of gmoccapy to english. How can I do this? I didn't find a solution. Thanks for your help in advance!
I'm using gmoccapy 3.1.3.6 on a german linux. I want to change the language of gmoccapy to english. How can I do this? I didn't find a solution. Thanks for your help in advance!
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Offline
- Moderator
-
Less
More
- Posts: 2081
- Thank you received: 413
15 May 2021 20:52 #208973
by newbynobi
The easiest is to change your lokale settings of the OS, as gmoccapy will react on your locale settings, or you look for the translation file gmoccapy / de_po and rename or delete that one. Default language is English, so not finding the translation files will present it in english
Norbert
Replied by newbynobi on topic Change language
Hi *,
I'm using gmoccapy 3.1.3.6 on a german linux. I want to change the language of gmoccapy to english. How can I do this? I didn't find a solution. Thanks for your help in advance!
The easiest is to change your lokale settings of the OS, as gmoccapy will react on your locale settings, or you look for the translation file gmoccapy / de_po and rename or delete that one. Default language is English, so not finding the translation files will present it in english
Norbert
Please Log in or Create an account to join the conversation.
- anli
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
16 May 2021 10:15 #209059
by anli
Replied by anli on topic Change language
Hi Norbert,
thank you for your suggestion. Do I have to delete de.po before I compile LinuxCNC? I can't find where it is located. I searched for de_po and de.po and can only find the files in the sources.
Kind regards, André
thank you for your suggestion. Do I have to delete de.po before I compile LinuxCNC? I can't find where it is located. I searched for de_po and de.po and can only find the files in the sources.
Kind regards, André
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Offline
- Moderator
-
Less
More
- Posts: 2081
- Thank you received: 413
16 May 2021 11:35 #209072
by newbynobi
Replied by newbynobi on topic Change language
Hallo André,
if you work from source, you will find the file:
linuxcnc-dev/src/po/gmoccapy/de.po
Just rename that one prior to compiling.
If you use an installed version of LinuxCNC I am not bale to tell you where the file is located, I expect it to be in usr/share/...
but I have at the moment only access to my development systems.
Norbert
if you work from source, you will find the file:
linuxcnc-dev/src/po/gmoccapy/de.po
Just rename that one prior to compiling.
If you use an installed version of LinuxCNC I am not bale to tell you where the file is located, I expect it to be in usr/share/...
but I have at the moment only access to my development systems.
Norbert
Please Log in or Create an account to join the conversation.
- anli
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
16 May 2021 15:19 - 16 May 2021 15:19 #209103
by anli
Replied by anli on topic Change language
Hallo Norbert,
thanks a lot! Hm, I can't find the files anywhere in the system - only in the dev directories. Moving the de.po file outside of the directory prior to compiling helped - but it would be good to be able to switch languages after installation. So I would be glad if you can tell me where I can find the de.po file after installation.
Maybe it would be good to have the possibility to change the language via a config option too? I could have a look to create one but I can't find the entry point in code. The only thing I found isin the whatever.c file. If anyone could point me to the right direction here this would be great. I think it could be helpful to switch to english sometimes when the messages are in local languages to get better help e. g. in the forum. I created a (already merged) PR for german language this morning so I could create one for the config option as well once found 
Andre (litti)
thanks a lot! Hm, I can't find the files anywhere in the system - only in the dev directories. Moving the de.po file outside of the directory prior to compiling helped - but it would be good to be able to switch languages after installation. So I would be glad if you can tell me where I can find the de.po file after installation.
Maybe it would be good to have the possibility to change the language via a config option too? I could have a look to create one but I can't find the entry point in code. The only thing I found is
// Mark strings for translation, but defer translation to userspace
#define _(s) (s)

Andre (litti)
Last edit: 16 May 2021 15:19 by anli.
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Offline
- Moderator
-
Less
More
- Posts: 2081
- Thank you received: 413
16 May 2021 19:48 #209158
by newbynobi
Replied by newbynobi on topic Change language
Gmocapy translation files are loaded within the gmoccapy. Py file. Look in the sources it's all at the beginning
Norbert
Norbert
Please Log in or Create an account to join the conversation.
- anli
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 20
- Thank you received: 1
16 May 2021 20:25 #209166
by anli
Replied by anli on topic Change language
Thank you! Do you think it makes sense if I create a PR where you can change language settings?
André
André
Please Log in or Create an account to join the conversation.
- HalaszAttila
- Offline
- Premium Member
-
Less
More
- Posts: 147
- Thank you received: 5
30 Jul 2021 22:35 - 30 Jul 2021 22:44 #216407
by HalaszAttila
Replied by HalaszAttila on topic Change language
Hello,
can you please tell me, how can I activate for example a hu.po translate file?
I compiled Linuxcnc from source, and find the translate files. But i dont know how to activate them.
If i change the linux language, Gmoccapy will follow the system lang, but in this case for some reason the preview path will offsetted. See in this topic:
forum.linuxcnc.org/gmoccapy/32592-tool-p...er-changing-language
Maybe if i just use Gamoccapy with translate file, and the linux system remain on english, maybe the path offset will solved.
locale.setlocale(locale.LC_ALL, '')
Maybe this need to edit in gmoccapy.py file?
Thanks for help.
can you please tell me, how can I activate for example a hu.po translate file?
I compiled Linuxcnc from source, and find the translate files. But i dont know how to activate them.
If i change the linux language, Gmoccapy will follow the system lang, but in this case for some reason the preview path will offsetted. See in this topic:
forum.linuxcnc.org/gmoccapy/32592-tool-p...er-changing-language
Maybe if i just use Gamoccapy with translate file, and the linux system remain on english, maybe the path offset will solved.

locale.setlocale(locale.LC_ALL, '')
Maybe this need to edit in gmoccapy.py file?
Thanks for help.

Last edit: 30 Jul 2021 22:44 by HalaszAttila.
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Offline
- Moderator
-
Less
More
- Posts: 2081
- Thank you received: 413
01 Aug 2021 16:29 #216625
by newbynobi
Replied by newbynobi on topic Change language
gmoccapy will check the locale settings of the system and set the language automatically.
For testing I just rename the de.po file to be de.old and then the hu.po to be de.po
This is just a work around, but it helps me to see if translation files fit the screen sizes.
Norbert
For testing I just rename the de.po file to be de.old and then the hu.po to be de.po
This is just a work around, but it helps me to see if translation files fit the screen sizes.
Norbert
Please Log in or Create an account to join the conversation.
- HalaszAttila
- Offline
- Premium Member
-
Less
More
- Posts: 147
- Thank you received: 5
03 Aug 2021 06:20 #216787
by HalaszAttila
Replied by HalaszAttila on topic Change language
Thanks,
i tested it, but it works just if i set linux to Geman language. (de.po -> hu.po)
But if linux is on english language dont works. Becouse no en.po file which to rename to. Maybe the default language is english. Where can i find the english language file? I plan to rewrite it by hand
i tested it, but it works just if i set linux to Geman language. (de.po -> hu.po)
But if linux is on english language dont works. Becouse no en.po file which to rename to. Maybe the default language is english. Where can i find the english language file? I plan to rewrite it by hand

Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.080 seconds