MCPcopy Create free account
hub / github.com/OpenPrinting/cups / ppdLocalizeAttr

Function ppdLocalizeAttr

cups/ppd-localize.c:180–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 */
179
180ppd_attr_t * /* O - Localized attribute or @code NULL@ if none exists */
181ppdLocalizeAttr(ppd_file_t *ppd, /* I - PPD file */
182 const char *keyword, /* I - Main keyword */
183 const char *spec) /* I - Option keyword or @code NULL@ for none */
184{
185 ppd_attr_t *locattr; /* Localized attribute */
186 char ll_CC[6]; /* Language + country locale */
187
188
189 /*
190 * Get the default language...
191 */
192
193 ppd_ll_CC(ll_CC, sizeof(ll_CC));
194
195 /*
196 * Find the localized attribute...
197 */
198
199 if (spec)
200 locattr = _ppdLocalizedAttr(ppd, keyword, spec, ll_CC);
201 else
202 locattr = _ppdLocalizedAttr(ppd, "Translation", keyword, ll_CC);
203
204 if (!locattr)
205 locattr = ppdFindAttr(ppd, keyword, spec);
206
207 return (locattr);
208}
209
210
211/*

Callers

nothing calls this directly

Calls 3

ppd_ll_CCFunction · 0.85
_ppdLocalizedAttrFunction · 0.85
ppdFindAttrFunction · 0.85

Tested by

no test coverage detected