File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,39 @@ function ngAddSupportedLang()
425
425
return true ;
426
426
}
427
427
428
+ /**
429
+ * Function: ngLangDisplayName
430
+ * Gets language(s) display name.
431
+ *
432
+ * Syntax: mixed *ngLangDisplayName* (mixed id [, bool ucfirst=true])
433
+ *
434
+ * Returns:
435
+ * Language display name(s).
436
+ */
437
+ function ngLangDisplayName ( lng , ucfirst )
438
+ {
439
+ if ( ( typeof lng !== 'undefined' ) && ( ngc_Lang ) ) {
440
+ if ( ng_IsObjVar ( lng ) ) {
441
+ var ret = { } ;
442
+ for ( var i in lng ) {
443
+ var l = lng [ i ] ;
444
+ if ( l ) ret [ l ] = ngLangDisplayName ( l ) ;
445
+ }
446
+ return ret ;
447
+ }
448
+ lng = ngNormalizeLang ( lng ) ;
449
+ if ( lng == 'cz' ) lng = 'cs' ;
450
+ var t ;
451
+ if ( ( lng !== '' ) && ( ng_IsObjVar ( ngc_Lang [ lng ] ) ) ) {
452
+ t = ngc_Lang [ lng ] [ 'locale_language_native' ] ;
453
+ if ( typeof t === 'undefined' ) t = ngc_Lang [ lng ] [ 'locale_language' ] ;
454
+ }
455
+ if ( typeof t === 'undefined' ) t = lng . toUpperCase ( ) ;
456
+ else if ( ngVal ( ucfirst , true ) ) t = t . substr ( 0 , 1 ) . toUpperCase ( ) + t . substr ( 1 ) ;
457
+ return t ;
458
+ }
459
+ }
460
+
428
461
/**
429
462
* Function: ngTxt
430
463
* Gets locale text.
You can’t perform that action at this time.
0 commit comments