I love coding, I have a site with two languages, and I have a button; if the user has not yet login, the user will be redirected to /my-account and display 'Please login', otherwise, button will show 'My Dashboard' and the user will be redirected to /dashboard
After installing the WPML, I need to get the lang code and change the url, could you advise how I can do that?
Thank you for contacting WPML Support. You may use the wpml_current_language hook in PHP files to get the current language code and display the content accordingly. Here is an example of a condition: