Translate the contact form

Tic TacTic Tac Registered Users Posts: 70 Big grins
edited February 6, 2014 in SmugMug Customization
Hi...

My website is in french...

Is there a way to translate the information on the contact form?

- To:
- Your email address
- Subject
- The question

As well as the "Message sent..." response

Thanks!

Comments

  • Tic TacTic Tac Registered Users Posts: 70 Big grins
    edited January 23, 2014
    Any ideas?
  • beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited January 23, 2014
    I've cobbled-together some messy code which allows replacement of the text arrowed in the following screenshot:

    customtextcontactform.jpg

    It's not ideal - there are downsides:
    In the original form, the info after "To:" is added automatically, it's whatever you set as your SM nickname. My code isn't that clever, it replaces the whole line with plain text which won't change if you change your nickname.
    The line-spacing could be better.
    And YMMV if you have different fonts, margins etc. etc...

    Here's the code, stick it in an "Entire Site" CSS content block and alter the bold text to whatever you need:
    .sm-contact-pro-form:before {
      content: "[B]To: BG![/B] \A\A [B]From:[/B] \A\A\A\A [B]Subject:[/B] \A\A\A\A\A [B]Your message:[/B]";
      position: absolute;
      top: 25px;
      left: 200px;
      white-space: pre;
    }
    
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(1) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(2) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(3) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(4) label {
      visibility:hidden;
    }
    

    I've not yet looked into the "Message sent" pop-up.

    I daresay that one of the resident CSS gurus could do a better job.
    Yippee ki-yay, footer-muckers!
  • beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited January 24, 2014
    Revised code - improves spacing:
    .sm-contact-pro-form:before {
      content: "To: [B]BG![/B] \A\A [B]Your email address:[/B] \A\A\A\A [B]Subject:[/B] \A\A\A\A [B]Your message:[/B]";
      position: absolute;
      top: 25px;
      left: 200px;
      white-space: pre;
    }
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(4),
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(3) {
      margin-top: 16px
    }
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(1) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(2) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(3) label,
    .sm-contact-pro-form .sm-form-contents .sm-form-field-overhead:nth-child(4) label {
      visibility: hidden
    }
    .sm-procontact-overlay .sm-contact-pro-form .sm-form-field-textarea {
      height: 165px;
    }
    
    Yippee ki-yay, footer-muckers!
  • Tic TacTic Tac Registered Users Posts: 70 Big grins
    edited January 31, 2014
    Thanks!!!

    I will try that!
  • Tic TacTic Tac Registered Users Posts: 70 Big grins
    edited February 6, 2014
    Hi!

    Thanks! it worked well!

    Other elements that would have to be translated in the same window are:

    - "Contact" at the top of the window
    - "Cancel"
    - "Send"

    Doable?
  • beardedgitbeardedgit Registered Users Posts: 854 Major grins
    edited February 6, 2014
    Tic Tac wrote: »
    Other elements that would have to be translated in the same window are:

    - "Contact" at the top of the window
    - "Cancel"
    - "Send"

    Doable?
    All probably doable, I've tried but not achieved much, as I don't have sufficient skills/knowledge.

    I suggest that you contact the helpdesk regarding this matter.
    http://help.smugmug.com/customer/portal/emails/new

    Good luck thumb.gif
    Yippee ki-yay, footer-muckers!
  • Tic TacTic Tac Registered Users Posts: 70 Big grins
    edited February 6, 2014
    You certainly did a wonderful job helping me with this so far. Thank you again! I will check with the help desk.
Sign In or Register to comment.