[openstreetmap/openstreetmap-website] Add English names to Select Language dialog (PR #6313)

Minh Nguyễn notifications at github.com
Tue Aug 12 07:46:57 UTC 2025


@1ec5 commented on this pull request.



> +        <small lang="en" class="english_name d-block text-secondary">
+          <%= language[:english_name] %>
+        </small>

We use [`Intl.DisplayNames`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) elsewhere to show an arbitrary language’s name in the currently active language:

https://github.com/openstreetmap/openstreetmap-website/blob/c0debf6a95e87994c195e7ea7f6db39180cfaea4/app/assets/javascripts/index/element.js#L114

If an English speaker flips to Marathi out of curiosity, this change helps them find it by the English name, and they’ll also be able to switch back to English easily, because the main link text will always say “English”. Then they can go to any other language using the English name again. However, a Greek speaker won’t have the same luxury of finding Marathi by the Greek name without recognizing Marathi’s writing system or language code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6313#discussion_r2268996058
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6313/review/3109070208 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250812/6ab76d77/attachment.htm>


More information about the rails-dev mailing list