[openstreetmap/openstreetmap-website] Apply `lang` to localized `name:*` values (Issue #6834)

Arpan Mukherjee notifications at github.com
Tue Mar 3 15:14:18 UTC 2026


Arpan200502 left a comment (openstreetmap/openstreetmap-website#6834)

Hi, I’d like to work on this issue.

>From what I understand, localized tag values such as `name:fr`, `name:ja`, etc. are currently rendered without a `lang` attribute, which can affect font selection and screen reader behavior.

My plan is to:

- Identify where localized tags are rendered in the element page view
- Detect subkeys matching language patterns (e.g. `name:<lang>`)
- Extract the language code and apply it as a `lang` attribute in the rendered HTML
- Add tests to ensure correct rendering

I will also look into whether basic IETF language tag validation should be included or if a regex-based approach is sufficient.

Please let me know if this approach sounds reasonable.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6834#issuecomment-3991712954
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/6834/3991712954 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260303/b327fb00/attachment-0001.htm>


More information about the rails-dev mailing list