Getting the current language from editor(not frontend), but from component view tsx(Polylang and Sage)
I’m wondering if someone had to do this before. I implemented a solution that works but I am wondering if there is a clean way to do it. So I have a component(.tsx) that list articles using the wordpress API, to fill out a Checkbox with articles titles, but because there are 2 languages for backend and frontend, when the user is writing a page or introducing the content, I need to filter the article list per current language, so I need to know in which language is editing the page.