@@ -75,6 +75,9 @@ static int cups_message_compare(_cups_message_t *m1, _cups_message_t *m2);
7575//
7676// 'cupsLangAddStrings()' - Add strings for the specified language.
7777//
78+ // This function adds strings for the specified language. It is equivalent to
79+ // calling @link cupsLangFind@ followed by @link cupsLangLoadStrings@.
80+ //
7881
7982bool // O - `true` on success, `false` on failure
8083cupsLangAddStrings (
@@ -94,9 +97,12 @@ cupsLangAddStrings(
9497//
9598// 'cupsLangFind()' - Find a language localization.
9699//
100+ // This function finds the localization information for the specified language
101+ // or locale name.
102+ //
97103
98104cups_lang_t * // O - Language data
99- cupsLangFind (const char * language ) // I - Language or locale name
105+ cupsLangFind (const char * language ) // I - Language or locale name, `NULL` for the current locale
100106{
101107 char langname [16 ]; // Requested language name
102108 cups_lang_t * lang ; // Current language...
@@ -134,6 +140,9 @@ cupsLangFind(const char *language) // I - Language or locale name
134140//
135141// 'cupsLangFormatString()' - Create a localized formatted string.
136142//
143+ // This function formats a string using the localized version of the "format"
144+ // string argument, which supports all of the `printf` format specifiers.
145+ //
137146
138147const char * // O - Formatted string
139148cupsLangFormatString (
@@ -223,11 +232,21 @@ cupsLangIsRTL(cups_lang_t *lang) // I - Language
223232//
224233// 'cupsLangLoadStrings()' - Load a message catalog for a language.
225234//
235+ // This function loads a message catalog for a language. The catalog must be in
236+ // the Apple .strings format. For example, the following translates the strings
237+ // "Yes", "No", and "Welcome, %s." to French:
238+ //
239+ // ```
240+ // "Yes" = "Oui";
241+ // "No" = "Non";
242+ // "Welcome, %s." = "Bievenue, %s.";
243+ // ```
244+ //
226245
227246bool // O - `true` on success, `false` on failure
228247cupsLangLoadStrings (
229248 cups_lang_t * lang , // I - Language data
230- const char * filename , // I - Filename of `NULL` for none
249+ const char * filename , // I - Filename or `NULL` for none
231250 const char * strings ) // I - Strings or `NULL` for none
232251{
233252 bool ret = true; // Return value
@@ -560,7 +579,11 @@ cupsLangLoadStrings(
560579
561580
562581//
563- // 'cupsLangSetDirectory()' - Set a directory containing localizations.
582+ // 'cupsLangSetDirectory()' - Set the directory containing localizations.
583+ //
584+ // This function sets the directory where .strings files can be found. The
585+ // files are named "LOCALE.string" where "LOCALE" is the locale name, for
586+ // example "fr" for generic French and "fr-CA" for Canadian French.
564587//
565588
566589void
0 commit comments