test
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • xuxo Friend
    #662468

    Hi, field labels in Spanish contact form appears in english. See screenshot

    I just found the following code in ../templates/uber/js/script.js, in line 69

    // Add Placeholder form contact
    var formContact = $('.contact-form-1');
    if (formContact.length > 0) {
    $('#jform_contact_name', formContact).attr('placeholder','Name');
    $('#jform_contact_email', formContact).attr('placeholder','Mail');
    $('#jform_contact_emailmsg', formContact).attr('placeholder','Subject');
    $('#jform_contact_message', formContact).attr('placeholder','Write your message here');

    Please I’d like to know how to setup this in more than one language.

    Thanks a lot for your help

    xuxo

    Saguaros Moderator
    #662649

    Hi xuxo,

    Let me check whether we can add language constants within this javascript or not.

    Will get back to you.

    Saguaros Moderator
    #745807

    Hi xuxo,

    Let me check whether we can add language constants within this javascript or not.

    Will get back to you.

    xuxo Friend
    #664891

    Some new on this issue ??

    Thanks for your help

    xuxo

    xuxo Friend
    #746393

    Some new on this issue ??

    Thanks for your help

    xuxo

    Saguaros Moderator
    #665115

    Hi xuxo,

    You can open above script.js file in Uber template folder and change to this:


    // Add Placeholder form contact
    var formContact = $('.contact-form-1');
    if (formContact.length > 0) {
    $('#jform_contact_name', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_EMAIL_NAME_LABEL'));
    $('#jform_contact_email', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_EMAIL_LABEL'));
    $('#jform_contact_emailmsg', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_LABEL'));
    $('#jform_contact_message', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_DESC'));

    if($('.ie8').length > 0) {
    $("input[placeholder], textarea[placeholder]", formContact).each(function(i, e){
    if($(e).val() == "") {
    $(e).val($(e).attr("placeholder"));
    }
    $(e).blur(function(){
    if($(this).val()=="")
    $(this).val($(e).attr("placeholder"));
    }).focus(function() {
    if($(this).val() == $(e).attr("placeholder"))
    $(this).val("");
    });
    });
    }
    }

    Download the attached file and unzip it to: /root/templates/uber/html/com_contact/contact/default_form-1.php

    Finally, open the language file for com_contact in associated language folder on your site. For example, if English is default language, go to file: /root/language/en-GB/en-GB.com_contact.ini and add translated text for above text field

    Remember to backup files before making change.

    Saguaros Moderator
    #746506

    Hi xuxo,

    You can open above script.js file in Uber template folder and change to this:


    // Add Placeholder form contact
    var formContact = $('.contact-form-1');
    if (formContact.length > 0) {
    $('#jform_contact_name', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_EMAIL_NAME_LABEL'));
    $('#jform_contact_email', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_EMAIL_LABEL'));
    $('#jform_contact_emailmsg', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_LABEL'));
    $('#jform_contact_message', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_DESC'));

    if($('.ie8').length > 0) {
    $("input[placeholder], textarea[placeholder]", formContact).each(function(i, e){
    if($(e).val() == "") {
    $(e).val($(e).attr("placeholder"));
    }
    $(e).blur(function(){
    if($(this).val()=="")
    $(this).val($(e).attr("placeholder"));
    }).focus(function() {
    if($(this).val() == $(e).attr("placeholder"))
    $(this).val("");
    });
    });
    }
    }

    Download the attached file and unzip it to: /root/templates/uber/html/com_contact/contact/default_form-1.php

    Finally, open the language file for com_contact in associated language folder on your site. For example, if English is default language, go to file: /root/language/en-GB/en-GB.com_contact.ini and add translated text for above text field

    Remember to backup files before making change.

    GTR Webdesign Friend
    #993134

    Hello @saguaros,

    Is it possible to upload the file we have to unzip to: /root/templates/uber/html/com_contact/contact/default_form-1.php again?

    I think this download was lost in the process of the new JoomlArt website.

    With kind regards,

    Michiel Smit
    Grafi Totaal Reclame

    Saguaros Moderator
    #993151

    Hi Michiel Smit,

    May I know which Uber style are you using? Could you update the URL of contact page here so I can have a look?

    GTR Webdesign Friend
    #993158

    Sure @saguaros,

    The link is: http://web0087.zxcs.nl/~towerliv/en/contact

    I already did step one (the edit of the script.js) so there is no text in the placeholders at this time.

    Saguaros Moderator
    #993378

    You can send me the Admin & FTP account of your site, I will check for you.

    P/s: you can provide info via your reply and flag it as PRIVATE reply.

    GTR Webdesign Friend
    #993409

    Hello @saguaros,

    I can only give you access to the Admin of the website if you give me your IP-adress, so I can whitelist you.

    But isn’t it possible to give me the right code so I can do it myself? I already changed the code of the ../templates/uber/js/script.js in the code you provided in the old topic post. The only thing I need is the "download" you refer to in this topic post of August 25, 2015 at 7:47 am.

    With kind regards,

    Michiel Smit Grafi Totaal Reclame

    Saguaros Moderator
    #993756
    This reply has been marked as private.
    GTR Webdesign Friend
    #993806

    Hello @saguaros,

    I can’t see your marked as private info.

    With kind regards,

    Michiel Smit
    Grafi Totaal Reclame

    Saguaros Moderator
    #994034

    Hi Michiel,

    Pls create a new topic, I will follow it.

    Regards

Viewing 15 posts - 1 through 15 (of 17 total)

This topic contains 16 replies, has 3 voices, and was last updated by  Saguaros 7 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum