Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_DRAFT int32_t U_EXPORT2 uldn_languageDisplayName ( const ULocaleDisplayNames ldn,
const char *  lang,
UChar *  result,
int32_t  maxResultSize,
UErrorCode pErrorCode 

Returns the display name of the provided language code.

ldn the LocaleDisplayNames instance
lang the language code whose display name to return
result receives the display name
maxResultSize the size of the result buffer
pErrorCode the status code
the actual buffer size needed for the display name. If it's greater than maxResultSize, the returned name will be truncated. ICU 4.4

Definition at line 580 of file locdspnm.cpp.

References UnicodeString::extract(), U_FAILURE, and U_ILLEGAL_ARGUMENT_ERROR.

  if (U_FAILURE(*pErrorCode)) {
    return 0;
  if (ldn == NULL || lang == NULL || (result == NULL && maxResultSize > 0) || maxResultSize < 0) {
    return 0;
  UnicodeString temp(result, 0, maxResultSize);
  ((const LocaleDisplayNames *)ldn)->languageDisplayName(lang, temp);
  return temp.extract(result, maxResultSize, *pErrorCode);

Generated by  Doxygen 1.6.0   Back to index