Hi everyone,
I wanted ledger to print out month and weekday names in German,
so I tried:
% LC_TIME=de_DE ledger --file test/input/sample.dat --date-format '%A, %d. %B'
reg
and expected:
Donnerstag, 27. Mai Book Store Expenses:Books $20.00 $20.00
Expenses:Cards $40.00 $60.00
Expenses:Docs $30.00 $90.00
but got instead:
Thursday, 27. May Book Store Expenses:Books $20.00 $20.00
Expenses:Cards $40.00 $60.00
Expenses:Docs $30.00 $90.00
After digging around a bit I found that in src/times.cc:111
std::strftime() is used, but throughout ledger I could only
find that the global locale was set to the standard "C" locale,
when boost facets are used, which by the way "are not quite working yet"
as the #error pragma in src/times.cc:48 states.
Setting the global locale prior to the std::strftime() call
using std::locale::global(std::locale("")); introduced some
strange formatting (duplicate ',' as decimal separator)
errors when formatting commodities.
So my questions are:
- What is needed to get boost facets working and would that
enable me to format dates according to a specific locale?
- Would the use of strftime_l from xlocale (3) be acceptable?
I couldn't find a C++ variant of it.
- Is there another solution?
- Apart from that I came across strfmon (3), and was curious
whether it make sense to use that or other information about
standard currencies found in /usr/share/local/*/LC_MONETARY?
What's your opinion on these?
Cheers,
Alexis
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.