Skip to content

fix: respect browser language preference#442

Merged
DennisOSRM merged 2 commits intogh-pagesfrom
fix/browser-language
May 3, 2026
Merged

fix: respect browser language preference#442
DennisOSRM merged 2 commits intogh-pagesfrom
fix/browser-language

Conversation

@DennisOSRM
Copy link
Copy Markdown
Contributor

@DennisOSRM DennisOSRM commented May 3, 2026

Remove default OSRM_LANGUAGE from index.html so browser/URL-configured language is used when available.

This allows Accept-Language detection to select the appropriate localization when no runtime config sets the language.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Remove default OSRM_LANGUAGE so browser language detection is used when no config.json provides a language.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 3, 2026 12:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates language handling so the app no longer hardcodes English by default and can use the merged runtime language instead.

Changes:

  • Remove the default OSRM_LANGUAGE: 'en' entry from the static window.OSRM config in index.html.
  • Pass mergedOptions.language into the routing control instead of forcing 'en' in src/index.js.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/index.js Stops forcing English in the routing control and uses the merged language option.
index.html Removes the baked-in default language from the bootstrap config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.js
@DennisOSRM DennisOSRM changed the title Fix: respect browser language preference fix: respect browser language preference May 3, 2026
@DennisOSRM DennisOSRM merged commit 9f95b25 into gh-pages May 3, 2026
5 of 7 checks passed
@DennisOSRM DennisOSRM deleted the fix/browser-language branch May 3, 2026 13:32
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