I'd like to be able to show or hide certain pages in the main navigation menu based on whether or not they have certain prefixes in their title. This is mostly for the purpose of language translation. Example:
If /url?ln=spanish then I want the navigation bar to only show pages that were prefixed with spanish. But my problem is I don't know how to manipulate the correct variables or data structures. While googling I've been playing around with wp_get_nav_menu_items but I'm not sure. What file should my logic reside in and what data structure holds the menu items?
Is it possible to do the same thing on the main page index.php? Basically I'd like to hide or show certain Blog posts depending upon what prefix is in their title.