[Asterisk-Dev] German localization for dates

Andreas Granig a.granig at inode.at
Tue Jun 29 04:58:37 MST 2004


Hi,

I've done some work on saying dates correctly in German; attached you 
can find the diff. Some tests anyone?

I've implemented it the way that it says dates like "Dienstag, 
neunundzwanzigster Mai Zweitausendvier" for 2004-05-29 and "zwölf Uhr 
dreiundfünfzig" for times, here "12:53".
IMO this is the correct format for german times and dates.

The format line in voicemail.conf "de=Europe/Berlin|'vm-received' q 
'digits/at' H 'digits/oclock' M" will then produce "Dienstag, 
neunundzwanzigster Mai Zweitausendvier um zwölf Uhr dreiundfünfzig".

The patch also fixes a problem in say_number_full_de() where it tried to 
stream empty filenames.

But be warned, this patch has an impact on existing stuff: First, the 
parameter 'q' is changed from ABdY to AdBY when using German 
localization. This doesn't match the documentation then.
Second, some sound files at 
http://www.karl.aegee.org/asterisk.nsf/HT/sound-de, linked by 
voip-info.org, have to be changed, namely the h-xx.gsm files. They say 
for example "ersten", "zweiten", "dreizehnten" etc. but have to be 
"erster", "zweiter", dreizehnter".

A possibility to reuse the existing sound files would be to say an "am" 
before the day of month, so that it sounds like "Dienstag, am 
neunundzwanzigsten Mai...". I'm still thinking about a flexible solution 
to switch between these two formats.


Maybe it is helpful though.

Regards,
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asterisk_german_date.diff
Type: text/x-patch
Size: 8178 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20040629/e4ad61ca/asterisk_german_date.bin


More information about the asterisk-dev mailing list