WordPress.org

Ready to get started?Download WordPress

Forums

Transposh WordPress Translation
[resolved] translation of a supersized caption (19 posts)

  1. apessoa
    Member
    Posted 1 year ago #

    Hello
    First of all, let me congratulate you on this great plugin. It really simplifies and speeds up all the translation process.

    In one of the sites I'm using it we use a supersized script on the homepage, using each image with a caption to provide the main site messages. We are using a themeforest template called Incidental (link here).

    Everything works OK except for the supersized slider captions, that are not being translated. I've checked that the html is valid and that there are no js conflicts, however I can't even get transposh to "recognize" that there is some text there to be translated (when in translation edition mode in the frontend, some icons appear everywhere there is text to be translated, but no in the captions).

    What do you suggest we can do to be able to also translate the captions?

    Thanks in advance and best regards,

    http://wordpress.org/extend/plugins/transposh-translation-filter-for-wordpress/

  2. apessoa
    Member
    Posted 1 year ago #

    some additional info. I've talked to the theme developer, which does not know how this plugin works, but suggested that, since the text not being translated is inside a javascrip, that can be the issue.
    In fact looking at the source I see that the untranslated captions are rendered inside the supersize script at the bottom of the source.
    Pls see example below of one image and respective caption.

    Is there a way to also trigger the transposh plugin inside this script?

    Thanks in advance

    "....
    // Slideshow Images
    { image: 'http://www.futurahub.com/dome_new/wp-content/uploads/2012/07/anne1.jpg1.jpg', title: 'Elevada Visibilidade' , caption: 'Todos vão falar da sua marca. Os seus eventos serão inesquecíveis.' , thumb: 'http://www.futurahub.com/dome_new/wp-content/uploads/2012/07/anne1.jpg1-72x50.jpg'},...~2

  3. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Translation inside a javascript is a big issue, there are ways around this, how comfortable will you be if I give you some code examples and ask you to change the relevant code?

    LMK

  4. apessoa
    Member
    Posted 1 year ago #

    Hi Ofer
    Thanks for the reply.
    I'm not a coder, so problably won't be able to do anything myself. However, I'll provide them to the theme developer and try to work a way with him.

    So, please, post them :-)

    Best Regards,
    Aelxandre

  5. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I suggest we don't use a "broken phone", I will be happy to assist (if I can), just contact me directly using the form on our site.

    :)

  6. cristianltorres
    Member
    Posted 1 year ago #

    Hi, I've the same issue, I can change it if you give me some code examples, I've already contact you from the form on your site aswell, can you help me please?

  7. cristianltorres
    Member
    Posted 1 year ago #

    Hi Ofer Wald, can you please help me?

  8. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Was a bit offline recently, but I will get to your message and reply to it once the pile clears a bit

  9. cristianltorres
    Member
    Posted 1 year ago #

    Thanks a lot! I'll wait for your answer then...

  10. cristianltorres
    Member
    Posted 1 year ago #

    Hey Ofer Wald, now I also realice that the form's buttons "SEND" doen't translate neither.

    In that case, it shows the "translate" button, but when I write the text in the box (translated) nothing happend.

    The website is:
    http://www.elparaigua.com/

    You can see the slider here:
    http://www.elparaigua.com/cocktailbar/

    And the form here:
    http://www.elparaigua.com/cocktailbar/ubicacion/

    thanks for your help!

  11. cristianltorres
    Member
    Posted 1 year ago #

    Hi Ofer Wald, I'm sorry to insist, but I really need to fix this asap, the site is already online!

    Is there anyway I can access to a premium (quicker) support?

    Thanks, and again sorry if I bother...

  12. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Insisting is more then ok,

    Regarding the slider, I am not sure I was even able to solve the problem last time, if its the same component, than it generated the texts using some inline javascript,

    This is possible to fix, but needs some work and YMMV

    Regarding the form, this is more simple, do you have the .po/.mo files for the component that have created this form? just put them in and enable the integration feature, and it should work.

    An alternative would be to use the transposh_echo() function, but that depends on the implementation.

    Premium support is offered directly in the support tab of our plugin, it would have not helped you much in the last week, because of a virus I caught (not a computerized one), but it will get the slider fixed :)

    Sorry for the delays in replying (not just to you) and I hope I'll be able to catch up asap

  13. cristianltorres
    Member
    Posted 1 year ago #

    Thanks for your answer! Im sorry about your virus, hope you get well soon!

    Regarding the form button, I can't make it work with the solution you gave me, I already have the po/mo files in /languages and the integration activated

    The form is from the plugin "gravity forms" and the button's text is defined in the admin panel. I defined it "ENVIAR" ("send" in spanish), so no mater which language is chosen (english, catalan, german, etc..) I'll always be "ENVIAR"
    I thing the form's plug is sending that value directly from the admin, so that's why It doesn't translate?

    About the slider, ok THANKS I'll keep waiting, please let me know if I can speedy up things by sending you any files or information.

    I can thank you enough for your work man!
    thanks thanks thanks

    Cristian.

  14. cristianltorres
    Member
    Posted 1 year ago #

    Sorry! one more thing about the SLIDER,
    I thing IT IS the same component, anyway I've found this information about it:
    http://grandpixels.com/knowledgebase/item/linguini-fullscreen-slideshow-faq/

    Thanks!

  15. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Virus was already over by the time I replied, thanks for caring :)

    Although I would really really (and I do mean it) really like to help with this, I simply can't now. I am swamped with 300 items to handle in my inbox, some of paying clients :)

    The form issue should really be simple enough, do you have the gravity .po/.mo files with you? do they have a default SEND button text?

    As far as I recall from a short course collision I have had with gravity, they have a very nice set of hooks for handling stuff, and since they are a paid component they do provide good support.

    Just tell them you need the hook to change a text button programmaticaly, I will tell you the code you'll need inside it :)

  16. cristianltorres
    Member
    Posted 1 year ago #

    I'm glad you're healed!

    I've already send a message to the gravity support, lets see what they tell me.

    I've "played" a little bit with the gravity .mo files, but it didn't work out... :(
    Since the site is in spanish as main language, It only use the es_ES.mo file, but it doesn't use the others .mo files when I change the language using transposh.

    Let me explain better:
    as I told you before, The form is from the plugin "gravity forms" and the button's text is defined in the admin panel. I defined it "ENVIAR" ("send" in spanish), so no mater which language is chosen (english, catalan, german, etc..) I'll always be "ENVIAR".

    So What I did was to leave this field emtpy, then, instead of "ENVIAR" it shows "Submit" (even though the site's main language is SPANISH)
    Then I use the .mo files (es_ES) and IT CHANGE IT back to "Enviar" (at this point I thought I fix it!) but now, if I change the language to other language using transposh, it will show always "enviar" (it doesn't translate)

    So the .mo files would work only when I change the main language of the site, but not when I use transposh.

    Lets see what they told me about the "Hook" ok???

    And I'm looking foward to fix the SLIDER!! ;)

    Thanks a lot.

  17. cristianltorres
    Member
    Posted 1 year ago #

    HEy!!! they just answer!

    Here is our hook for changing the submit button - http://www.gravityhelp.com/documentation/page/Gform_submit_button

    Can you help me with that?

    Thanks!!

  18. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    Sure.

    See their example (with my modification):

    // filter the Gravity Forms button type
    add_filter("gform_submit_button", "form_submit_button", 10, 2);
    function form_submit_button($button, $form){
       // we create a small array for options
       $submits = array("es" => "spanish submit", "de" => "german submit");
       if (isset($submits[transposh_get_current_language()])) {
           $submittext = $submits[transposh_get_current_language()];
        } else {
            $submittext = "Submit";
        }
       return "<button class='button' id='gform_submit_button_{$form["id"]}'><span>{$submittext}</span></button>";
    }
    ?>

    Another option is to change this line to:

    return "<button class='button' id='gform_submit_button_{$form["id"]}'><span>".__("Submit")."</span></button>";

    And work with the .po/.mo integration...

    Actually, if build like that, the translation should have worked anyhow :) who knows.

    I hope this helps

  19. cristianltorres
    Member
    Posted 1 year ago #

    Great Ofer Wald! the code worked perfectly!!!

    Just one comment, the code miss the initial php tag: "<?php"

    Just to let it noted in case someone reach here trying to fix this.

    Thanks!!! I just need the slider fix and we're done here :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic