- This topic is empty.
-
AuthorPosts
-
October 17, 2014 at 3:45 am #186432
Marc2412
ParticipantHey all, here is my website: here
As you can see, to the right (top) you can see I added a language switcher.. When I translate to english the homepage is still in dutch. Every other page/menu item i manually changed but I have no idea how to change the text on the homepage. Does anyone here have an idea?
Thanks in advance,
Marc
October 17, 2014 at 4:02 am #186434Paulie_D
MemberIt’s not clear what you are asking.
Do you mean you have a switcher that should change pages but doesn’t work OR that you need to know how to make a switcher?
October 17, 2014 at 4:12 am #186436Marc2412
ParticipantI made the switcher as you can see there. But on the homepage is some text in dutch, like:
Door middel van je missie geef je aan wie je bent, wat je doet en wat je wil bereiken. Je missie is tijdloos, maar wel toe te passen op dit moment. (under the Missie picture).
I want to have that translated to english but I don’t know how.
October 17, 2014 at 4:51 am #186441Paulie_D
MemberAs I understand it it’s just a link to the other home page
For instance the NL page has
lang="nl-NL"
but ispage-id-136
The EN page has
lang="en-Us"
but ispage-id-50
Looks to me as though you have a page construction issue…not a switcher issue.
Bad PHP call?
October 17, 2014 at 5:05 am #186444Marc2412
ParticipantI changed it so it doesn’t show page-id’s anymore. I’m using the Polylang plugin.
October 17, 2014 at 5:16 am #186445Paulie_D
MemberI’m using the Polylang plugin.
Which does what?
The
page-id-50
actual HTML text is in Dutch (well some of it)…it’s calling the right page.,,,shouldn’t the text be in English?BTW – The page ids are shown in the source code…you can’t hide those.
The translation of a post, whether it is in the default language or not, is optional. The translation has to be done by the site editor as Polylang does not integrate any automatic or professional translation service.
October 17, 2014 at 5:21 am #186446Marc2412
Participantyea.. this stuff here: http://gyazo.com/c619382d03e63b7f1db96587174a6ce3
Needs to change to english, but it doesn’t. I dont know how to manually translate it when the page changes to en_US
October 17, 2014 at 5:22 am #186447Paulie_D
MemberNeeds to change to english, but it doesn’t. I dont know how to manually translate it when the page changes to en_US
You have to write it in English
The translation of a post, whether it is in the default language or not, is optional. The translation has to be done by the site editor as Polylang does not integrate any automatic or professional translation service.
October 17, 2014 at 5:26 am #186449Marc2412
ParticipantI know that but I don’t know how to. I have POEDIT to create PO and MO files, but I have no clue how to start/how to make that specific text in a diff language..
October 17, 2014 at 11:22 am #186487__
ParticipantI have POEDIT to create PO and MO files, but I have no clue how to start/how to make that specific text in a diff language..
- if you’re using gettext (which is the program that uses po/mo files), the first thing you need to do is learn how to use it. (Alternatively, hire a developer that does.)
-
the next step is to translate the text in question. poedit does not do this for you: its purpose is to save the translations you provide in the proper file format for gettext to use.
As for how to work with that specific text, you’d have to look at the docs for polylang. In general, there are two ways to provide translated text: (1) register the specific string (word, sentence, etc.) using the appropriate gettext function (
_()
; or whatever equivalent polylang uses), or (2) actually author and save a separate article (post) in the other language. Typically, you’ll take approach #1 for your templates and UI/ “informational” messages, and approach #2 for most of you actual content.Again, I can’t offer you any advice specific to the polylang plugin. I can tell you that internationalization is a hugely complex task, and that even the best plugin will never be able to simply handle it for you. The best solution is almost always to hire someone with lots of experience doing it.
October 17, 2014 at 5:24 pm #186507Marc2412
ParticipantOctober 18, 2014 at 12:19 am #186511__
ParticipantAs I said above, I don’t know anything about the polylang plugin specifically. However, a quick glance at their site indicates that
pll_register_string
should not be expected to do anything on its own:You have to register strings on the admin side with the function
pll_register_string
and display them on frontend withpll__
orpll_e
[emphasis added]And, as @Paulie_D pointed out above, you must also actually translate the string; the plugin does not do this for you.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.