Parsing Menu Items and Blog Posts

I’m sure what you’re asking can be done, but there’s a far simpler, significantly easier solution, just register each menu multiple times for each language, and show different menus for different languages.

This way you don’t need to figure out how to filter out menu items depending on GET variables, and your pages become more cacheable ( you could modify rewrite rules so that your URLs are pretty and take the form example.com/es/hello-world rather than example.com/hello-world?lang=es )

The benefit of this is that your language menus can be completely different, and they’ll work everywhere on your site, not just on posts and pages