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?