• Resolved Maksims

    (@diasaid)


    Hi,

    testing your beautiful theme and all was fine until i tried to found way to translate customizer contents. It is so easy if the site need just one language, but if 2 or 3? As i am weak at php at the moment it is hard. So i tried:

    1) WPML – it just disabled frontpage you build with customizer. Don’t find a way how to fix it, so disabled this plugin.
    2) Polylang – tried a lot, but failed. Same fail.
    3) qTranslate and other string Plugins – nothing helps. Yes they translates field names, but not a texts this fields contains.

    SO is there some way to translate this fields. Actually if there are some code with string i can change, would be great, because all i need just translate 5 sections in 2 languages.

    COuld you please help me or give some reading?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Ion Rutz

    (@ionrutz_machothemes)

    Hello @diasaid,

    First of all, thank you for the kind words.

    Please have a look here:
    https://qtranslatexteam.wordpress.com/faq/#CustomFields

    From what I can tell, if you use qTranslate X plugin you should be able to use this kind of syntax to deal with the text translation:
    [:en]English Text[:de]Deutsch[:]
    aka
    <!--:en-->English Text<!--:--><!--:de-->Deutsch<!--:-->

    Let me know if the above is doing the magic.

    Regards

    Thread Starter Maksims

    (@diasaid)

    Hi Ion,

    actually my fix was so simple. I uploaded plugin Loco Translate and this plugin alow to translate all strings. So simple! I just do not touch the Customizer fields, just translating the strings Plugin takes from phps.

    So at this moment i solved my problem.
    And yes this Loco Translate works fine with Polylang.

    Thread Starter Maksims

    (@diasaid)

    Hello,

    have one more little issue with this customizer. Ok, strings is ok, but what to do with urls? I can fill the field for one language, but others?

    Thread Starter Maksims

    (@diasaid)

    May be there are some if/else snippet for this situation. I saw smth like this in my other project, but wrote in js. And it worked perfectly with Polylang. I mean smth like:
    If lang=en, then url=”www.smth.com”, else url = “www.smth.com/en”

    Ion Rutz

    (@ionrutz_machothemes)

    Hello,

    You should give their documentation a try since this it’s getting over my knowledge.

    The solution you posted should work, but it seems like you need to do that manually for all the pages and it’s not really the best solution.

    I know that qTranslate X have an editor field to handle the links for different languages, so maybe you’d want to check the page Screen Options in the top right and also the plugin options while contacting them for more information.

    Regars

    Thread Starter Maksims

    (@diasaid)

    Ok, i just used if/elseif/else (INC_LANGUAGE_CODE=’lang1/lang2/lagn3′) {}. And it works great for links.

    May be you just would give me a little explain about Customizer work. Why it is so, that if you fill smth in customizer – that’s all, you then never get smth back through editing template files (links in my case). Feeling that there are some sort of importance are set, like in css !important.
    (i am very week in php, so sorry if question is silly)

    In my case what i needed to do, is reset my customizer and then editing templates again, and now all works. And no touch to Customizer ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Translate customizer content’ is closed to new replies.