Plugin frontend helper to get the client language code #5904
Labels
Component: PeerTube Plugin 📦
Features that can be developed in a plugin, but require PeerTube plugin API development
Type: Feature Request ✨
Describe the problem to be solved
In the livechat plugin, i want to add some links to the online documentation.
This documentation is translated in the same languages as Peertube.
So, i want to add the current user language code in the url, to point to the correct documentation page.
It seems the languages is calculated by Angular, with a logic that returns the first found criteria:
Describe the solution you would like
I don't want to reproduce the Angular logic in my code, and i'd like a helper function that returns the current language code.
I need this for frontend, but maybe it could also be useful for backend? I don't know if the backend knows the user's language?
The text was updated successfully, but these errors were encountered: