@@ 1104-1112 (lines=9) @@ | ||
1101 | $structure[] = '<optgroup label="' . esc_attr_x( 'Installed', 'translations' ) . '">'; |
|
1102 | } |
|
1103 | $structure[] = '<option value="" lang="en" data-installed="1">English (United States)</option>'; |
|
1104 | foreach ( $languages as $language ) { |
|
1105 | $structure[] = sprintf( |
|
1106 | '<option value="%s" lang="%s"%s data-installed="1">%s</option>', |
|
1107 | esc_attr( $language['language'] ), |
|
1108 | esc_attr( $language['lang'] ), |
|
1109 | selected( $language['language'], $args['selected'], false ), |
|
1110 | esc_html( $language['native_name'] ) |
|
1111 | ); |
|
1112 | } |
|
1113 | if ( $translations_available ) { |
|
1114 | $structure[] = '</optgroup>'; |
|
1115 | } |
|
@@ 1120-1128 (lines=9) @@ | ||
1117 | // List available translations. |
|
1118 | if ( $translations_available ) { |
|
1119 | $structure[] = '<optgroup label="' . esc_attr_x( 'Available', 'translations' ) . '">'; |
|
1120 | foreach ( $translations as $translation ) { |
|
1121 | $structure[] = sprintf( |
|
1122 | '<option value="%s" lang="%s"%s>%s</option>', |
|
1123 | esc_attr( $translation['language'] ), |
|
1124 | esc_attr( current( $translation['iso'] ) ), |
|
1125 | selected( $translation['language'], $args['selected'], false ), |
|
1126 | esc_html( $translation['native_name'] ) |
|
1127 | ); |
|
1128 | } |
|
1129 | $structure[] = '</optgroup>'; |
|
1130 | } |
|
1131 |