如何更改GNUCash UI语言?

时间:2021-02-26 07:22:11

I've been trying to change GNUCash UI language as it's described here: Link

我一直在尝试改变GNUCash UI语言,正如这里描述的:Link

...by running the following command in the terminal:

…在终端运行以下命令:

LANGUAGE=ar_SY LANG=ar_SY gnucash

But it returned the following:

但它返回如下:

The locale defined in the environment isn't supported. Falling back to the 'C' (US English) locale

不支持在环境中定义的语言环境。回到“C”(US English)语言环境

Any solution please?

任何解决方案吗?

I think there must be a general way to run a GTK application with a specific language.

我认为必须有一种通用的方法来使用特定的语言运行GTK应用程序。

3 个解决方案

#1


1  

There might be a problem in the .po translation files. In that file, the direction should be defined according to this article.

在.po翻译文件中可能有一个问题。在该文件中,应该根据本文定义方向。

#2


1  

tl;dr:

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 LC_ALL=nl_NL.UTF-8 gnucash

(change into the locale codes of your choice)

(更改为您选择的语言环境代码)


I know I'm a bit late to the game, but I was also running into issues with languages.

我知道我有点晚了,但是我也遇到了语言方面的问题。

As an extra, I really want to keep my system locale at en_C.UTF-8 / C because the Dutch language prescribes a comma for decimal separator and completely messes with day-to-day programming tasks (especially in LibreOffice). So I need GnuCash to run in 'translation mode'.

另外,我希望将系统语言环境保存在en_C中。UTF-8 / C因为荷兰语为十进制分隔符规定了一个逗号,并且完全混乱了日常的编程任务(特别是在LibreOffice中)。所以我需要在"翻译模式"下运行。

Anyway, running

总之,跑步

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 gnucash

did not work for me either (just runs in English). Then, I found this link (accessed on Aug 19, 2015) about locale settings in GnuCash.

也没有为我工作(只是用英语跑)。然后,我发现这个链接(在2015年8月19日被访问)关于GnuCash的地区设置。

In the section 'OS dependend tweaking', at the end of the 'Changing the Language on Linux' sub-section, they hinted to also specify the LC_ALL environment variable:

在“操作系统依赖”一节中,在“更改Linux的语言”小节的末尾,他们还暗示要指定LC_ALL环境变量:

If you can get the graphical interface in the correct language , but you can't get the accounts in the desired locale, you have to add the LC_ALL variable, like in the following example:

如果您能够以正确的语言获得图形界面,但无法在所需的语言环境中获得帐户,则必须添加LC_ALL变量,如下面的示例所示:

LANG=it_IT.UTF-8 LANGUAGE=it_IT.UTF8 LC_ALL=it_IT.UTF-8 gnucash

This does the trick for me:

这对我来说很有用:

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 LC_ALL=nl_NL.UTF-8 gnucash

Perhaps this might work for you:

也许这对你有用:

$ LANGUAGE=ar_SY LANG=ar_SY LC_ALL=ar_SY gnucash

#3


0  

If anybody is interested, a solution that can be used on Mac OS X (Yosemite) is to add these lines in Gnucash (in this case for Italian):

如果有人感兴趣,可以在Mac OS X (Yosemite)上使用的解决方案是在Gnucash中添加这些线(在本例中为意大利语):

export LANG=it_IT.UTF-8
export LANGUAGE=it_IT.UTF-8
export LC_ALL=it_IT.UTF-8

Following the advice on the above metioned link, these three lines should be added just above this part:

以下是上述连结的建议,请在此部份以上加上这三行:

$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS

Gnucash is an executable file located inside Gnucash.app that is present in your Applications folder (you should see Gnucash without .app extension). If you select it and in the dropdown menu you click on "Show Package Contents", you will find the Gnucash executable file in /Contents/MacOS folder. You can then modify the file with your preferred text editor.

Gnucash是位于Gnucash内部的一个可执行文件。应用程序在你的应用程序文件夹中(你应该看到没有。app扩展的Gnucash)。如果您选择它并在下拉菜单中单击“显示包内容”,您将在/Contents/MacOS文件夹中找到Gnucash可执行文件。然后可以使用首选的文本编辑器修改文件。

#1


1  

There might be a problem in the .po translation files. In that file, the direction should be defined according to this article.

在.po翻译文件中可能有一个问题。在该文件中,应该根据本文定义方向。

#2


1  

tl;dr:

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 LC_ALL=nl_NL.UTF-8 gnucash

(change into the locale codes of your choice)

(更改为您选择的语言环境代码)


I know I'm a bit late to the game, but I was also running into issues with languages.

我知道我有点晚了,但是我也遇到了语言方面的问题。

As an extra, I really want to keep my system locale at en_C.UTF-8 / C because the Dutch language prescribes a comma for decimal separator and completely messes with day-to-day programming tasks (especially in LibreOffice). So I need GnuCash to run in 'translation mode'.

另外,我希望将系统语言环境保存在en_C中。UTF-8 / C因为荷兰语为十进制分隔符规定了一个逗号,并且完全混乱了日常的编程任务(特别是在LibreOffice中)。所以我需要在"翻译模式"下运行。

Anyway, running

总之,跑步

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 gnucash

did not work for me either (just runs in English). Then, I found this link (accessed on Aug 19, 2015) about locale settings in GnuCash.

也没有为我工作(只是用英语跑)。然后,我发现这个链接(在2015年8月19日被访问)关于GnuCash的地区设置。

In the section 'OS dependend tweaking', at the end of the 'Changing the Language on Linux' sub-section, they hinted to also specify the LC_ALL environment variable:

在“操作系统依赖”一节中,在“更改Linux的语言”小节的末尾,他们还暗示要指定LC_ALL环境变量:

If you can get the graphical interface in the correct language , but you can't get the accounts in the desired locale, you have to add the LC_ALL variable, like in the following example:

如果您能够以正确的语言获得图形界面,但无法在所需的语言环境中获得帐户,则必须添加LC_ALL变量,如下面的示例所示:

LANG=it_IT.UTF-8 LANGUAGE=it_IT.UTF8 LC_ALL=it_IT.UTF-8 gnucash

This does the trick for me:

这对我来说很有用:

$ LANGUAGE=nl_NL.UTF-8 LANG=nl_NL.UTF-8 LC_ALL=nl_NL.UTF-8 gnucash

Perhaps this might work for you:

也许这对你有用:

$ LANGUAGE=ar_SY LANG=ar_SY LC_ALL=ar_SY gnucash

#3


0  

If anybody is interested, a solution that can be used on Mac OS X (Yosemite) is to add these lines in Gnucash (in this case for Italian):

如果有人感兴趣,可以在Mac OS X (Yosemite)上使用的解决方案是在Gnucash中添加这些线(在本例中为意大利语):

export LANG=it_IT.UTF-8
export LANGUAGE=it_IT.UTF-8
export LC_ALL=it_IT.UTF-8

Following the advice on the above metioned link, these three lines should be added just above this part:

以下是上述连结的建议,请在此部份以上加上这三行:

$EXEC "$bundle_contents/MacOS/$name-bin" $* $EXTRA_ARGS

Gnucash is an executable file located inside Gnucash.app that is present in your Applications folder (you should see Gnucash without .app extension). If you select it and in the dropdown menu you click on "Show Package Contents", you will find the Gnucash executable file in /Contents/MacOS folder. You can then modify the file with your preferred text editor.

Gnucash是位于Gnucash内部的一个可执行文件。应用程序在你的应用程序文件夹中(你应该看到没有。app扩展的Gnucash)。如果您选择它并在下拉菜单中单击“显示包内容”,您将在/Contents/MacOS文件夹中找到Gnucash可执行文件。然后可以使用首选的文本编辑器修改文件。