Skip to content

Expose available languages publicly#2649

Open
cicnavi wants to merge 1 commit into
masterfrom
feat-available-languages
Open

Expose available languages publicly#2649
cicnavi wants to merge 1 commit into
masterfrom
feat-available-languages

Conversation

@cicnavi

@cicnavi cicnavi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

I'm implementing support for ui_locales paremeter for oidc module simplesamlphp/simplesamlphp-module-oidc#350

I need to know langauages supported by SSP, and my initial thought was to rely on language.available confg option, but now I see there is additional handling in SSP method \SimpleSAML\Locale\Language::getInstalledLanguages which is used to populate availableLanguages property. So I propose to make a public getter for that property so this can be fetched by other consumers...

Also, in the constructor there is a step which checks for language request parameter in $_GET and, if set, uses it to set the language. I would propose a switch which can be used to turn this off, so when I call it from oidc I don't have this side effect.

This all should be fully backward compatible.

I see there is a public method \SimpleSAML\Locale\Language::getLanguageList, but I would rather propose also adding getter for availableLanguages, if you don't mind.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.76%. Comparing base (007a025) to head (39b8f22).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2649   +/-   ##
=========================================
  Coverage     46.75%   46.76%           
- Complexity     4288     4290    +2     
=========================================
  Files           184      184           
  Lines         13828    13830    +2     
=========================================
+ Hits           6465     6467    +2     
  Misses         7363     7363           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdijen

tvdijen commented Jul 2, 2026

Copy link
Copy Markdown
Member

Makes sense @cicnavi ! Code looks good.

@tvdijen tvdijen requested a review from monkeyiq July 2, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants