summaryrefslogtreecommitdiff
path: root/gettext-tools/src/write-csharp.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2004-03-15 11:48:59 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:11:50 +0200
commit1316d0bd76ab669052cc14306250403cc23d32bb (patch)
treecf639d948922ee51a0f04a285b27209686894b22 /gettext-tools/src/write-csharp.c
parent35935a26e1cfeb0c8285ac724ef6f5d7b46b7895 (diff)
downloadgettext-1316d0bd76ab669052cc14306250403cc23d32bb.tar.gz
Support for Serbian and Uzbek locales in C#.
Diffstat (limited to 'gettext-tools/src/write-csharp.c')
-rw-r--r--gettext-tools/src/write-csharp.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/gettext-tools/src/write-csharp.c b/gettext-tools/src/write-csharp.c
index 6e4e8030f..e417f18ad 100644
--- a/gettext-tools/src/write-csharp.c
+++ b/gettext-tools/src/write-csharp.c
@@ -1,5 +1,5 @@
/* Writing C# satellite assemblies.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003-2004 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -688,7 +688,28 @@ msgdomain_write_csharp (message_list_ty *mlp, const char *canon_encoding,
for (p = culture_name; *p != '\0'; p++)
if (*p == '_')
*p = '-';
+ if (strncmp (culture_name, "sr-CS", 5) == 0)
+ memcpy (culture_name, "sr-SP", 5);
+ p = strchr (culture_name, '@');
+ if (p != NULL)
+ {
+ if (strcmp (p, "@latin") == 0)
+ strcpy (p, "-Latn");
+ else if (strcmp (p, "@cyrillic") == 0)
+ strcpy (p, "-Cyrl");
+ }
+ if (strcmp (culture_name, "sr-SP") == 0)
+ {
+ free (culture_name);
+ culture_name = xstrdup ("sr-SP-Latn");
+ }
+ else if (strcmp (culture_name, "uz-UZ") == 0)
+ {
+ free (culture_name);
+ culture_name = xstrdup ("uz-UZ-Latn");
+ }
}
+
/* Compute the output file name. This code must be kept consistent with
intl.cs, function GetSatelliteAssembly(). */