vonloxley / Shariff-Mediawiki

A mediawiki-extension for Shariff, protecting users privacy.
4 stars 4 forks source link

acknowledge wiki language for Shariff #10

Closed krabina closed 4 years ago

krabina commented 4 years ago

not perfect, but acknowledges at least different de language versions (de-formal, de-AT, de-CH) in mediawiki to be mapped to "de" in Shariff.

Solves the problem better than https://github.com/vonloxley/Shariff-Mediawiki/pull/7

in reference to https://github.com/vonloxley/Shariff-Mediawiki/issues/6

krabina commented 4 years ago

this PR tries to set the language of Shariff to the language of the MediaWiki installation. If the wiki is in a language that Shariff does not know, it will ignore the setting and fallback to English.

This is not perfect, because even better it would refer to the user language, not the Wiki installation language. But I did not manage to accomplish that...

vonloxley commented 4 years ago

Thanks for the PR! I would prefer the if to test for substr($wgLanguageCode, 0, 3) === 'de-' otherwise it is fine. Would you change that, please?

vonloxley commented 3 years ago

Closes #6