Cannot Seem to Properly Translate Page Title

This topic contains 5 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #381840

    kairei
    Expired Member
    Post count: 78

    I’ve found on another thread I need to use the core translation file. Fine, makes sense. So, I want to translate this to Japanese:

    All %%pt_plural%% %%in_location_single%%

    %%in_location_single%% seems to have the order hard coded in the variable, at least I can’t find where it can be changed, so it is always “[in] [location]” with that specific order. So, the above becomes basically this:

    All %%pt_plural%% %%in%% %%location_single%%

    It seems to be combining two logically separate things (“in” and “location”) into one. This doesn’t seem ideal to me at first glance, but maybe I’m missing something. The reason it doesn’t seem ideal is that you seem to be forcing the user to come up with a translation where the “in” and “location” parts go together, and go together in your specific order, and that might not be how a particular language works. For example, in Japanese, “All Therapists In Tokyo” can be written as “東京のセラピスト.”

    東京 means “tokyo”

    の connects them with ownership, e.g. what kind of therapists are they? well, they’re tokyo therapists.

    セラピスト means “therapist” (I’m using a “Theraist” CPT)

    It isn’t particularly natural to translate the “all” part explicitly here.

    So, basically you wouldn’t translate the “in” part exactly and if you did use の for in, it still doesn’t work cause in_location_single seems to put it before the location and in Japanese it needs to go after.

    I thought I could just ignore in_location_single and use location_single instead. I used WPML to translate All %%pt_plural%% %%in_location_single%% like this:

    %%location_single%%の%%pt_plural%%

    That worked great on country/region/city pages. I get “[location]のセラピスト” just like I want. However, on the top level “Therapists” page it seems to use the same translation and I get “のセラピスト” which has the leading の which is just wrong because there is no location… Apparently the location_single (and in_location_single) part just goes away on that page since there is no location.

    I’m not sure what to do. If the “In” and “Location” order could be customized, that might work but then I’d have to translate “in” as “の” which likely won’t be right if that “in” translation is used elsewhere on the site.

    If I could somehow translate the main /therapists/ page separate from the location-based pages that might work too but not sure if there is any way to do that.

    Any thoughts?

    #381950

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I flagged this for the developers, they’ll let you know asap.

    Thanks

    #381965

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You are right, this translation is wrong, i have changed it to “in %s” so you can change the position, this will be in the next release or if you need it sooner you can download from here https://github.com/GeoDirectory/geodirectory

    Thanks,

    Stiofan

    #382001

    kairei
    Expired Member
    Post count: 78

    Ok, thanks. I found a workaround for now but will probably revisit when the next release comes out.

    One thing… Will “in %s” still mean that the top level /therapists/ page will have a random “in ” (or its translation) left hanging i.e. %s will be filled with the location for all country/region/city pages but on the root page there will be no location so “in %s” will end up as “in “? Or, will I be able to use %%in_location%% which is implemented as “in %s” and that whole thing will disappear. Probably this is it but just wanted to confirm… Thanks!

    #382002

    kairei
    Expired Member
    Post count: 78

    Oh, and I think there might be similar situations for the All tags and All categories pages. But I guess if those use %%in_location%% then your fix just fixes everything?

    #382090

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Where every u see in LOCATION you will be able to use that “in %s” to change the ordering.

    Stiofan

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket