/*
- * "$Id$"
- *
* PPD localization 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
- * property of Apple Inc. and are protected by Federal copyright
- * law. Distribution and use rights are outlined in the file "LICENSE.txt"
- * which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*
* PostScript is a trademark of Adobe Systems, Inc.
*
* (or any derivative of it) with software other than GNU
* GhostScript (or its derivatives) is governed by the CUPS license
* agreement.
- *
- * This file is subject to the Apple OS-Developed Software exception.
*/
/*
* descriptions, printer presets, and custom option parameters. Each
* localized string uses the UTF-8 character encoding.
*
- * @since CUPS 1.2/OS X 10.5@
+ * @since CUPS 1.2/macOS 10.5@
*/
int /* O - 0 on success, -1 on error */
*
* If no value of the requested scheme can be found, NULL is returned.
*
- * @since CUPS 1.3/OS X 10.5@
+ * @since CUPS 1.3/macOS 10.5@
*/
const char * /* O - Value or NULL if not found */
* text from the attribute value. If no localized text for the requested
* name can be found, @code NULL@ is returned.
*
- * @since CUPS 1.4/OS X 10.6@
+ * @since CUPS 1.4/macOS 10.6@
*/
const char * /* O - Value or @code NULL@ if not found */
/*
* '_ppdHashName()' - Generate a hash value for a device or profile name.
*
- * This function is primarily used on OS X, but is generally accessible
+ * This function is primarily used on macOS, but is generally accessible
* since cupstestppd needs to check for profile name collisions in PPD files...
*/
/*
* <rdar://problem/22130168>
*
- * Hong Kong locale needs special handling... Sigh...
+ * Multiple locales need special handling... Sigh...
*/
if (!strcmp(ll_CC, "zh_HK"))
snprintf(lkeyword, sizeof(lkeyword), "jp.%s", keyword);
attr = ppdFindAttr(ppd, lkeyword, spec);
}
+ else if (!strncmp(ll_CC, "nb", 2))
+ {
+ /*
+ * Norway has two languages, "Bokmal" (the primary one)
+ * and "Nynorsk" (new Norwegian); this code maps from the (currently)
+ * recommended "nb" to the previously recommended "no"...
+ */
+
+ snprintf(lkeyword, sizeof(lkeyword), "no.%s", keyword);
+ attr = ppdFindAttr(ppd, lkeyword, spec);
+ }
else if (!strncmp(ll_CC, "no", 2))
{
/*
lang->language, ll_CC));
return (lang);
}
-
-
-/*
- * End of "$Id$".
- */