I have a site on wordpress and want to make language switcher english/russian. I want to implement the next url scheme:
Default (english) urls look like that: site.com/company
Russian urls look like that: site.com/ru/company
I want to make next programming handling: When url like site.com/ru/company comes to WP, I detect this situation and internally call page site.com/company with query string lang=ru for the appropriate handling this lang in page template file company.php.
But I don't want to make external redirect (301) through the browser, and handle that situation internally.
How to implement this scheme with Rewrite API ?