Add support for Norwegian numbers (bug #1067)
authorMark Spencer <markster@digium.com>
Fri, 20 Feb 2004 17:43:46 +0000 (17:43 +0000)
committerMark Spencer <markster@digium.com>
Fri, 20 Feb 2004 17:43:46 +0000 (17:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2204 65c4cc65-6c06-0410-ace0-fbb531ad65f3

say.c

diff --git a/say.c b/say.c
index 52fc5b9..2ca6605 100755 (executable)
--- a/say.c
+++ b/say.c
@@ -94,8 +94,11 @@ int ast_say_number_full(struct ast_channel *chan, int num, char *ints, char *lan
        if (0) {
        /* XXX Only works for english XXX */
        } else {
-               /* Use english numbers */
-               language = "en";
+               /* Use english numbers if a given language is supported. */
+               /* As a special case, Norwegian has the same numerical grammar
+                  as English */
+               if (strcasecmp(language, "no"))
+                       language = "en";
                while(!res && (num || playh)) {
                        if (playh) {
                                snprintf(fn, sizeof(fn), "digits/hundred");