Contents

CFCopyLocalizedStringWithDefaultValue

Returns a localized version of a localization string.

Declaration

#define CFCopyLocalizedStringWithDefaultValue(key, tbl, bundle, value, comment)

Parameters

  • key:

    The development language version of the string. This string is used as the search key to locate the localized version of the string.

  • tbl:

    The name of the strings file to search. The name should not include the strings filename extension.

  • bundle:

    The bundle to examine.

  • value:

    The default value for the requested localization string.

  • comment:

    A comment to provide the translators with contextual information necessary for proper translation.

Return Value

The localized version of the requested string. If no value corresponding to key is found, returns value, unless value is NULL or an empty string, in which case key is returned instead. Ownership follows the The Create Rule.

Discussion

This is a macro variant of CFBundleCopyLocalizedString(_:_:_:_:) for use with the genstrings tool.

See Also

Managing Localizations