@@ 1074-1078 (lines=5) @@ | ||
1071 | foreach ( $langChoices as $lang ) { |
|
1072 | $code = wfBCP47( $lang ); |
|
1073 | $name = Language::fetchLanguageName( $code, $this->getContext()->getLanguage()->getCode() ); |
|
1074 | if ( $name !== '' ) { |
|
1075 | $display = $this->getContext()->msg( 'img-lang-opt', $code, $name )->text(); |
|
1076 | } else { |
|
1077 | $display = $code; |
|
1078 | } |
|
1079 | $opts .= "\n" . Xml::option( $display, $code, $curLang === $code ); |
|
1080 | if ( $curLang === $code ) { |
|
1081 | $haveCurrentLang = true; |
|
@@ 1098-1102 (lines=5) @@ | ||
1095 | } |
|
1096 | if ( !$haveCurrentLang && $defaultLang !== $curLang ) { |
|
1097 | $name = Language::fetchLanguageName( $curLang, $this->getContext()->getLanguage()->getCode() ); |
|
1098 | if ( $name !== '' ) { |
|
1099 | $display = $this->getContext()->msg( 'img-lang-opt', $curLang, $name )->text(); |
|
1100 | } else { |
|
1101 | $display = $curLang; |
|
1102 | } |
|
1103 | $opts = Xml::option( $display, $curLang, true ) . $opts; |
|
1104 | } |
|
1105 |