joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[6.1] Refactor SiteApplication language detection

Open joomdonation opened this issue 1 month ago • 0 comments

Pull Request for Issue # .

Summary of Changes

This PR improves the initialiseApp() method in SiteApplication by extracting the language-detection logic into a separate method. The logic remains unchanged, but the code is cleaner, reduces nesting, and is easier to maintain.

Testing Instructions

  • Uses Joomla 6.1
  • Apply patch
  • Navigate to random pages from frontend of the site and make sure it is still working as before.

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works, with cleaner, easier to maintain code

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [x] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [x] No documentation changes for manual.joomla.org needed

joomdonation avatar Dec 08 '25 10:12 joomdonation