Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Translating problem

  • This topic is empty.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #186432
    Marc2412
    Participant

    Hey 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

    #186434
    Paulie_D
    Member

    It’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?

    #186436
    Marc2412
    Participant

    I 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.

    #186441
    Paulie_D
    Member

    As I understand it it’s just a link to the other home page

    For instance the NL page has lang="nl-NL" but is page-id-136

    The EN page has lang="en-Us" but is page-id-50

    Looks to me as though you have a page construction issue…not a switcher issue.

    Bad PHP call?

    #186444
    Marc2412
    Participant

    I changed it so it doesn’t show page-id’s anymore. I’m using the Polylang plugin.

    #186445
    Paulie_D
    Member

    I’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.

    https://wordpress.org/plugins/polylang/

    #186446
    Marc2412
    Participant

    yea.. 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

    #186447
    Paulie_D
    Member

    Needs 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.

    #186449
    Marc2412
    Participant

    I 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..

    #186487
    __
    Participant

    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..

    1. 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.)
    2. 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.

    #186507
    Marc2412
    Participant

    check

    I created that string as you can see in functions.php

    Failed to do the job though.

    #186511
    __
    Participant

    As 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 with pll__ or pll_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.

Viewing 12 posts - 1 through 12 (of 12 total)
  • The forum ‘Back End’ is closed to new topics and replies.