HomePhabricator

Add ?uselang= support to toolforge_i18n

Tags
None
Referenced Files
None
Subscribers
None

Description

Add ?uselang= support to toolforge_i18n

I initially intended to keep this limited to lexeme-forms, but as soon
as I tried to use this library in Wikidata Image Positions, I realized
how much more annoying it is to test the translations without this
feature. And really, I think it makes sense in general – it’s just
mirroring MediaWiki, after all. (Note that the argument is also a
MediaWiki language code, not a BCP-47 language code.)

The precedence in the tool’s custom implementation – ?uselang above
session above Accept-Language header – is a bit awkward, but I don’t
think that can be helped unless I want to add some sort of language
preference support to the default implementation, and I’m not sure I
want to do that yet.

Details

Provenance
LucasWerkmeisterAuthored on Apr 21 2024, 2:22 PM
Parents
R2362:ab0848d57b22: Correctly handle language codes from Accept-Language
Branches
Unknown
Tags
Unknown
ChangeId
None