[Asterisk-Dev] internationalisation of voice-prompts

Florian Overkamp florian at obsimref.com
Fri Oct 24 08:49:36 MST 2003


Hi,

At 12:35 24-10-2003 +0200, you wrote:
>I have just studio recorded the dutch prompts for asterisk and am now
>delving into the source to see what needs to be changed to enable dutch
>grammar.. I can patch the code for this, but am wondering as to the best way
>to do this.
>For example I can patch say_number only for the >20 && < 100 part to enable
>the two-and-twenty syntax we use instead to the english twenty-two (and
>have done so) however when more languages get introduced this will lead to a
>horrible unreadable if/then/else tree. But then again, writing a separate
>tree for each language will introduce a lot of code replication..

Good point. I actually have some older stuff laying around to do this, 
albeit not too elegant.

The call ast_say_number_full from say.c would be adapted to do this; I 
believe the best way to do this to create a say.conf or something that 
would define a syntax, very much like indications.conf:

[general]
country=us

[us]
alias = uk
description = United States / North America
number = msd,lsd

[nl]
alias = de
description = Netherlands
number = lsd,prompt(en),msd


>Same issues go for voicemail2, but since the grammar is hardcoded there it
>will need case statements in each language dependant call..

Good point, one would also require a 'dateday' syntax

>I'm looking for a better more general way of changing the code then just
>patching it for a specific language. any ideas or has someone already done
>some work in this direction? It would be nice to create something which
>would also be usable for greek, hebrew or chinese :-) but the problem is I'm
>no linguist and don't know the grammar of those languages.

I think building a simple syntax parser would be extendible enough for most 
purposes. We don't have to focus on creating the be-all-and-end-all right 
now, just to create something that is flexible enough to grow :-)

Florian





More information about the asterisk-dev mailing list