UI translations of languages not officially supported by Twitter
Please check the following before you continue
- [X] Checked if the feature has not been requested before
Describe the feature Is the intention to provide only translations for Twitter-supported languages, or is there a mechanism to choose a language not officially supported, to implement a new translation?
If the intention currently is to only support Twitter-supported languages, this feature request is to support additional language translations. If the mechanism already exists, this is more of a general question about how to provide one (I would begin working on one for Kiswahili).
Hm, I never thought of such a feature before. Interesting idea.
Twitter uses .js files under the hood for providing translations of the ui.
You can find them by looking in the network tab under the dev tools in your browser and searching for i18n.
Here are two examples:
https://abs.twimg.com/responsive-web/client-web-legacy/i18n/en.e75ba7d5.js
https://abs.twimg.com/responsive-web/client-web-legacy/i18n/de.83263e45.js
In this example, if you go ahead and change t("k/n2")._register("de" to t("k/n2")._register("en" and paste the result in the console, you can see that some parts of the website change to german if you click on a tweet or something similar.
If you can come up with a way to integrate this feature into the script I would be happy to merge your changes! I don't really want to get into intercepting network requests (read: replacing the current language .js with a custom one) at the moment, I'm not even sure if that's the right way to do it/possible at all. There will probably be CSP issues I fear which I would love to never see again.