-
Notifications
You must be signed in to change notification settings - Fork 536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move language_choose_code()
into new LangChooser
class
#1081
Conversation
We can easily write test codes without calls of `myphpnet_language()` and `default_language()`.
🚀 Regression report for commit b585014 is at https://web-php-regression-report-pr-1081.preview.thephp.foundation |
🚀 Preview for commit b585014 can be found at https://web-php-pr-1081.preview.thephp.foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance, looks good, thanks!
I'll take another closer look soon, and maybe someone else will have some comments to make.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
If there's no objection, I'll merge it later today.
Thank you! |
This PR introduces a new class,
LangChooser
, replacing thelanguage_choose_code()
function.The goal is to make
/releases/8.3/index.php
respect users' language preferences, similar to the manual pages. I initially considered reusinglanguage_choose_code()
, but its reliance on global variables made that challenging. As a result, I refactored the logic into a new class to simplify reuse in the/releases
pages.A follow-up PR to update
/releases/8.3/index.php
will be submitted once this PR is merged.