summaryrefslogtreecommitdiff
path: root/cups/ppd.c
diff options
context:
space:
mode:
authorMichael Sweet <michael.r.sweet@gmail.com>2017-03-08 14:35:12 -0500
committerMichael Sweet <michael.r.sweet@gmail.com>2017-03-08 14:35:12 -0500
commit9c0c89124b4d251674905fc8560cf9ed21040a46 (patch)
treee666e1c2578a45ca234a454b14e3991f80af1e49 /cups/ppd.c
parent4888dff95ccb6bf221d9dfddf19faed528d43ce4 (diff)
downloadcups-9c0c89124b4d251674905fc8560cf9ed21040a46.tar.gz
Fix some more localization issues on macOS (<rdar://problem/27245567>)
Diffstat (limited to 'cups/ppd.c')
-rw-r--r--cups/ppd.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/cups/ppd.c b/cups/ppd.c
index 63d5dd2fe..5bd839d1a 100644
--- a/cups/ppd.c
+++ b/cups/ppd.c
@@ -1,7 +1,7 @@
/*
* PPD file routines for CUPS.
*
- * Copyright 2007-2015 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -579,12 +579,28 @@ _ppdOpen(
/*
* <rdar://problem/22130168>
+ * <rdar://problem/27245567>
*
* Need to use a different base language for some locales...
*/
if (!strcmp(lang->language, "zh_HK"))
- strlcpy(ll, "zh_TW.", sizeof(ll));
+ { /* Traditional Chinese + variants */
+ strlcpy(ll_CC, "zh_TW.", sizeof(ll_CC));
+ strlcpy(ll, "zh_", sizeof(ll));
+ }
+ else if (!strncmp(lang->language, "zh", 2))
+ strlcpy(ll, "zh_", sizeof(ll)); /* Any Chinese variant */
+ else if (!strncmp(lang->language, "jp", 2))
+ { /* Any Japanese variant */
+ strlcpy(ll_CC, "ja", sizeof(ll_CC));
+ strlcpy(ll, "jp", sizeof(ll));
+ }
+ else if (!strncmp(lang->language, "nb", 2) || !strncmp(lang->language, "no", 2))
+ { /* Any Norwegian variant */
+ strlcpy(ll_CC, "nb", sizeof(ll_CC));
+ strlcpy(ll, "no", sizeof(ll));
+ }
else
snprintf(ll, sizeof(ll), "%2.2s.", lang->language);