Permalink
Browse files

MDL-35739 show langs on separate lines in CLI installer

This fixes column width issues and compatibility with RTL languages.
  • Loading branch information...
1 parent 562dbe4 commit e9c9610f8b06ba9b5b73fa918cf83b49ebc987ad @skodak skodak committed Oct 7, 2012
Showing with 2 additions and 12 deletions.
  1. +2 −12 admin/cli/install.php
View
@@ -240,18 +240,8 @@
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";

0 comments on commit e9c9610

Please sign in to comment.