This fixes column width issues and compatibility with RTL languages.
if ($interactive) {
cli_separator();
$languages = get_string_manager()->get_list_of_translations();
- // format the langs nicely - 3 per line
- $c = 0;
- $langlist = '';
- foreach ($languages as $key=>$lang) {
- $c++;
- $length = iconv_strlen($lang, 'UTF-8');
- $padded = $lang.str_repeat(' ', 38-$length);
- $langlist .= $padded;
- if ($c % 3 == 0) {
- $langlist .= "\n";
- }
- }
+ // Do not put the langs into columns because it is not compatible with RTL.
+ $langlist = implode("\n", $languages);
$default = $CFG->lang;
cli_heading(get_string('availablelangs', 'install'));
echo $langlist."\n";