Open oyla12 opened 3 years ago
If you use LANGUAGE=...
that in fact only changes the languages, not the other locale depending settings such as currency, date and such - see https://www.baeldung.com/linux/locale-environment-variables for details about the available environment vars that define the locale.
The best option for your usecase is probably to export LC_ALL=de_DE
before starting kraft.
Thanks for reaching out!
Moin
First of all: I tested it and it works, merci :) Hope that this is the solution I searching for a (too) long time.
Some thoughts about that behavior: I think this is not usual and the issue is not really closed. I've made a test, creating a new bill in German and then switched back to English. The result is, that the currency symbols changing from €
to $
, but the absolute value keep the same (30€ -> 30$). So all generated bills are fundamental changing by changing the system language, and if someone is not knowing this, this could result in bad problems for the user. I'm not sure if people use it with an network database on multiple devices. Also using an english system with just partly German Software is quite popular around my personal circle. So I think a consistent option (saved in the database) would still be a useful and common new option / feature :)
Thanks for your work!
Ok, yes, your're right, that is not optimal.
In fact, the database already contains fields for country and language in Kraft.
MariaDB [kraft_kfg]> select country, language from document where docID=3378;
+---------+----------+
| country | language |
+---------+----------+
| de | |
+---------+----------+
1 row in set (0.000 sec)
Could you do a similar select in your database to check what the content in these columns is? Thanks!
I made two documents, one starting the software as default in english, and one starting with German. The database was created before by firststart setup in english. In both cases (so docID=1 and docID=2) I seem to get 'en' as country and an empty language field :)
I agree to your statements. The mentioned patch changes the code so that the database entries for country and language for documents and archived docs allow now to reconstruct the locale under which they were created.
It will be an enhancement for later to prevent users from the silent locale change that was described above.
Moin
I'm not able to set the language and the currency. In my situation I use an en_US Debian system as base. This results in starting (0.95) in english language (as expected).
Start using
LANGUAGE=de_DE kraft
in terminal works for the language, but I still have$
as currency, not€
.It seem to be a missing feature, or it is very hard to find or I just don't get it on a sunday afternoon. :)