Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62750

langlist config gets confused by spaces

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      As an admin

      Go to Site administration -> Language -> Language packs and check you have more than one language package installed. For example, you can insall Deutsch language (de)

      Go to Site administration -> Language -> Language settings and add to 'Languages on language menu' (langlist) some of the installed language list, adding and space after the coma. For example, 'en, de'. And mark 'Display language menu' (langmenu) to Yes.

      Go to Your profile -> Preferences -> Preferred language and check you can select any of the languages in language menu list. For example, English and Deutsch 

      Check there is a dropbox menu in the header to select any of the languages in language menu list. For example, English and Deutsch 

       

       

      Show
      As an admin Go to Site administration -> Language -> Language packs and check you have more than one language package installed. For example, you can insall Deutsch language (de) Go to Site administration -> Language -> Language settings and add to 'Languages on language menu' (langlist) some of the installed language list, adding and space after the coma. For example, 'en, de'. And mark 'Display language menu' (langmenu) to Yes. Go to Your profile -> Preferences -> Preferred language and check you can select any of the languages in language menu list. For example, English and Deutsch  Check there is a dropbox menu in the header to select any of the languages in language menu list. For example, English and Deutsch     
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62750_master

      Description

      It appears that if you put spaces in the langlist setting e.g. "en, de" then Moodle will look for a language with a space at the start " de", not find it, then not display the language that looks to the user as if it's is configured correctly.

      From a few different vague reports I found while googling to see what my issue was, I'm thinking this might have happened to a few people.

      Moodle should probably trim these strings before use.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m