Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2012
    Posts
    10
    Plugin Contributions
    0

    css problem Have all products names use the css class "notranslate"

    Hello, I am implementing the Google Translate Widget onto my website. I noticed the widget translates the products names as well, which I do not want. Is there a way to give all the products names the class of "notranslate" so all the names remain unchanged? Instead off adding the names to glossary since that doesn't always work as intended. Thanks.

    website link: www.scpcat5e.com/testsite

    ZenCart V1.5 - No Upgrade
    Hosted @ Geekhost
    PHP Version: 5.3.27 (Zend: 2.3.0)
    Database: MySQL 5.1.70-cll
    Used Theme as starting point

  2. #2
    Join Date
    Sep 2012
    Posts
    10
    Plugin Contributions
    0

    Default Re: Have all products names use the css class "notranslate"

    So I figured out the answer. I would be happy to share if anybody is interested. To the moderators and more experienced zennners I have a few questions. Am I posting my questions in the right thread? Should I share my findings?
    Thank you, Simon.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Have all products names use the css class "notranslate"

    This subforum is probably the closest to relevant; this topic doesn't exactly fit any aside from the catchall General Questions.
    Sharing the solution to this issue would be very welcome, as I have never seen it asked let alone solved before. If someone else needs to know, it will be valuable to them.
    Last edited by gjh42; 5 Nov 2013 at 09:28 PM.

  4. #4
    Join Date
    Sep 2012
    Posts
    10
    Plugin Contributions
    0

    Default Re: Have all products names use the css class "notranslate"

    Okay so these are my findings so far to fix some of the issues I was having.

    1. Website layout "breaking" - I have found putting each paragraph of text or inline elements into a <span><p>Text goes in here...</p></span> keeps the layout when you switch to another langugage. Also you can add a line break </p></span></br> after closing the tag and the layout will not "break".

    2. class ="noTranslate" - Anything thing you do not want translated, ie a website link, place into a <span class="notranslate">www.mywebsite.com</span> tag.

    3. Product names inadvertently changing - The best solution I found for this was to find the class in the correct php file and adding "notranslate" class to it. HTML elements can have multiple classes associated to them so just add a space and the name of the class. The downfall is of course this is a sitewide change so it may or may not suit your needs.

    4. Google Translator Toolkit - Using Glossaries and Corrections you can fix some inadvertently changing text, however, I am finding for some reason it does not always work correctly. For example my companies short name, SCP, works in some areas and in other areas even on the same page SCP changes to CPS. I have added this to both glossary and corrections and it does not work 100%. Not sure if there is more for me to do.

    5. Sometimes when some text is translated you lose a space in between each word. A simple word1&nbsp;word2 will fix that.

    Hopefully this will help somebody. As I figure more work around I will be happy to post.

    Work hard and take no prisoners my fellow Zenners,
    Simon
    Last edited by structuredcable; 6 Nov 2013 at 08:22 PM.

 

 

Similar Threads

  1. Editing the "new products" and "all products" page
    By jtimko in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Dec 2011, 10:39 PM
  2. Replies: 2
    Last Post: 17 May 2011, 03:50 AM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. Replies: 3
    Last Post: 3 Jun 2008, 11:41 AM
  5. Inside the "Categories" box it says "New Products" and "All Products"...
    By john9 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Feb 2007, 07:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR