WordPress.org

Ready to get started?Download WordPress

Forums

qTranslate
Advanced custom fields translation (7 posts)

  1. giampietro
    Member
    Posted 1 year ago #

    hello,
    is possible with qTranslate translate into the theme, the strings of Advanced Custom Fields?
    thanks

    http://wordpress.org/extend/plugins/qtranslate/

  2. yoyo
    Member
    Posted 1 year ago #

    hi. did you found a solution on how to translate "advanced custom fields"?

  3. Dani-Girl
    Member
    Posted 1 year ago #

    Same with the hand coding the translations into your template, you do for the fields, but you need to use add_filters() to your get_field(code) to make sure then quicktags or langage tages render properly:

    enter your content like this in the ACF you created:
    <!--en-->your content<!--:--><!--es-->your content<!--:-->

    in your template you echo out your results:

    <?php echo add_filters('the_content',get_field("yourfieldname")); ?>

    The above will also render out Shortcodes that you may have in your field

    <!--en-->[shortcode for some element]<!--:--><!--es-->[shortcode for some element]<!--:-->

    You cannot use shortcodes with the qTranslate quickcodes ([:en] [:es]) , you have to use the fulle language code (<!--:en--> <!--:--> )

  4. lavijain
    Member
    Posted 1 year ago #

    hi,

    can u please define it. i am using qtranslate and i added my custom string on

    http://theatrelacbrome.ca/registration/?lang=fr

    as u can see it is not showing translation to french of english words.

    can anyone help me..

    thnx

  5. lavijain
    Member
    Posted 1 year ago #

    Hey,

    I have done it ..

    whenever we need to display a HTML Text On our own that is not previously defined then we have to print it like this:

    <?php echo __("<!--:fr-->Commence à: <!--:--><!--:en-->Show Time: <!--:-->"); ?>

    But Now what problem occured is it is showing the question mark when encounter the characters like : à

    :(

    UTF problem or what trying to solve .
    do anyone knew it already..
    plz help
    thnx in advance..

  6. lavijain
    Member
    Posted 1 year ago #

    okayyy

    i found the solution for this also...

    <?php echo __(utf8_encode("<!--:fr-->Commence à: <!--:--><!--:en-->Show Time: <!--:-->")); ?>

    here i need to call this function to make special characters to be shown.

    really great plugin...

  7. Alexxali
    Member
    Posted 1 year ago #

    lavijain, you don't need to use <!--:fr-->.

    Just write <?php _e('English word', TEXTDOMAIN); ?>

    Then, with POEdit, for example, you can translate it. Then when you click language icon (in your case: French), it will automatically change to 'Mot francais'.

    Just make sure that you translated everything.

    Hope it will help you ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags