"Available Languages" supports being passed excluded languages

Created on 12 July 2018, over 6 years ago
Updated 2 October 2024, about 2 months ago

As per the title, tmgmt_available_languages() supports being passed an excluded languages array but every call to it isn't populated.

I took out the parameter as it didn't seem sensible to keep passing it in ... instead it's just pulled out of the config factory within the function itself. I didn't bother with a test for this as I felt like it'd just be testing PHP functionality? But I'm happy to add some kind of test if someone feels that in_array() really needs a test applied to it?...

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Core

Created by

πŸ‡¬πŸ‡§United Kingdom pobster

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine tbkot

    New patch for the 1.16 version

  • πŸ‡¬πŸ‡§United Kingdom pobster

    6 YEARS ...

    Well, I guess you could do this now:

    $languages = array_map(fn ($language) => $language->getName(), $this->languageManager->getLanguages());
    

    It doesn't seem like it matters though, if they haven't merged it yet - unlikely they'll merge it in the next 6 years either.

Production build 0.71.5 2024