+ Reply to Thread
Results 1 to 8 of 8

Thread: How to translate a specific part of an HTML file

 
  1. #1
    Registered User RobertNorris's Avatar
    Join Date
    Feb 2010
    Location
    DreamLand
    Age
    30
    Posts
    23
    Rep Power
    110

    Default How to translate a specific part of an HTML file

    Hi everyone,

    Does anyone know how to setup MemSource to translate only one specific part of an HTML file?

    I do not want to translate the sidebars, header and footer of the webpage.

    Kind Regards

  2. #2
    Moderator
    Join Date
    Mar 2012
    Age
    29
    Posts
    982
    Rep Power
    920

    Default Re: How to translate a specific part of an HTML file

    Hi Robert, Memsource has not the intelligence to separate sidebars, header and footer from the main content, if you have some knowledge of HTML you can edit the file with a text editor and mark as comment (put it between <!-- and -->) all the content that you don't want to translate, after the translation you delete the comment marks <!-- and --> and Done.

  3. #3
    Moderator
    Join Date
    Jul 2007
    Posts
    1,403
    Rep Power
    1157

    Default Re: How to translate a specific part of an HTML file

    So, if I put between this (put it between <!-- and -->) whatever I need to block from translation is like hidding the text that needs to remain the same? I can do that with the JEditor, right?

  4. #4
    Moderator
    Join Date
    Mar 2012
    Age
    29
    Posts
    982
    Rep Power
    920

    Default Re: How to translate a specific part of an HTML file

    Right Analaura, you can use the <!-- and --> marks for html and xml files. You need open it with any text editor, I use Notepad++ is very light, fast, has a lot of configurable shortcuts and plugins, try it =)

  5. #5
    Moderator
    Join Date
    Jul 2007
    Posts
    1,403
    Rep Power
    1157

    Default Re: How to translate a specific part of an HTML file

    So, you can do this for html, xml files and any other format? like xliff? or properties?

  6. #6
    Moderator
    Join Date
    Mar 2012
    Age
    29
    Posts
    982
    Rep Power
    920

    Default Re: How to translate a specific part of an HTML file

    Yeah Analaura ^_^, each file format has its proper comentary marks (one or more chars that says that a part of the content is a commentary so Memsource can ignore it) for html, xml and xliff you can use <!-- and --> for properties you may put a # at begining of a line to indicate that its a commentary (# Line that you want to mark as comment).

  7. #7
    Moderator
    Join Date
    Mar 2012
    Age
    29
    Posts
    982
    Rep Power
    920

    Default Re: How to translate a specific part of an HTML file

    One more thing Analaura, maybe you have comments in the original file that you may preserve, so after you use this technique you may have the original comments and the comments that you create to ignore non translatable parts, after the translation you have to identify the comments that you create to only remove these, so you use another mark that permit you to identify it, example:

    -----Original File-----
    A Content

    <!--This Content is very important-->
    Another content

    blah blah blah

    Please do not translate it

    <!--We need more things here-->
    More things
    -----Original File-----





    -----Pre-Processed File-----
    A Content

    <!--This Content is very important-->
    Another content

    blah blah blah

    <!--zzzzPlease do not translate itzzzz-->

    <!--We need more things here-->
    More things
    -----Pre-Processed File-----

    After translation you search and replace <!--zzzz for nothing and zzzz--> for nothing.

  8. #8
    Moderator
    Join Date
    Jul 2007
    Posts
    1,403
    Rep Power
    1157

    Default Re: How to translate a specific part of an HTML file

    ahhh, I see how it works now. Im not sure I could do it myself but this gives me a better idea about how itīs done.
    I like this
    Thank you for your explanation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •