Selective Page Content Localization

Hi,

Wondering if anyone has any suggestions on how to localize some WP front-end pages depending on URL? Lets say I want to localize 5 pages and serve one of two versions dependng on the URL the client is currently on. The site is all in U.S. English but we want to local some pages for British English. So if a customer is at http://www.company.com/uk/ and clicks on the "Products" link from the nav menu, they will be presented w/ a products page that is geared toward UK customers. If a customer is at http://www.company.com and clicks on the same "Products" nav menu button, they should see the U.S. products page.

We don't need the entire site in two versions. Just a select few pages to be in two versions and WP to serve the correct version depending on if the client is on a http://www.company.com or http://www.company.com/uk/something page.

Thanks,

SW

  • stevewest15
    • Flash Drive

    Hi,

    This is what I was hoping some WPMU guru can help me answer: We are not planning on utilizing a plugin for the translation. Instead, we will create two versions of the pages that will require localization. Then have WP serve one of those pages depending on if customer is on the .com/uk or the none uk url.

    SW

  • stevewest15
    • Flash Drive

    Sorry if my post wasn't clear but I'm not looking for a translation plugin.

    Instead, I need to be able to serve two different types of content depending on the url a customer is on. For example:

    If user is on a UK url (ie mysite.com/UK/somepage), then change the web site main nav menu to serve a different nav menu (uk_menu) setup on the WP admin Appearance -> Menus.

    If user is on the none UK url (ie mysite.com/someapge), then serve the regular main nav menu.

    So what I'm looking for is for WP to be able to detect if customer is on UK page and then the web site main navigational menus should change to the alternate nav menu.

    Thanks,

    SW

  • Arun Basil Lal
    • New Recruit

    Hey SW,

    I get that you are not looking at translations.

    You want the user to see a uk_menu when he is on mysite.com/UK/somepage and a normal menu when he is on mysite.com/someapge right?

    My question is, how are you going to create mysite.com/UK/somepage.

    Is this going to be a sub-page? In that case using the is_page() function you can easily display conditional menus: http://codex.wordpress.org/Function_Reference/is_page
    (I can help with code if this is the case)

    You could create UK as a page and UK/somepage could be a sub-page.

    I am under the impression that you have something specific planned in mind. If you are looking for ideas, please tell me what you want as the end result.

  • aecnu
    • WP Unicorn

    Greetings stevewest15,

    Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that's great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU Dev member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.