How to Protect Your Custom Code During Translation

You are here

How to Protect Your Custom Code During Translation

How to Protect Your Custom Code During Translation

By Dale Eggett, Lingotek Localization Engineer

Language services professionals know that translation technology—such as translation management systems (TMS) and connectors—can help automate and streamline the translation process. These tools can pull text directly from many file formats and enterprise applications:

  • Content Management Systems
  • Knowledge Bases
  • Code Repositories
  • CRM and other sales systems
  • and many more.

A top TMS will also let you create a translation workflow that’s customized to fit your needs and can automatically push the completed translation back into your system. This streamlining of what used to be a time-consuming, manual process speeds up delivery. You can use the translated content right away and deliver personalized content immediately to your global customers.

While we all want localization to be automated as much as possible, not everything works right out of the box. In many cases, translation issues arise where a one-size-fits-all approach won’t work; this can happen when you have customized needs in your translatable content, such as custom coding.

What can go wrong with custom coding during localization?

If your content is not treated properly during localization, it can come out of the process as unintelligible or even unusable. If content that should be translated isn’t, you end up with a mixture of translated and untranslated text. If you need the src attribute of an image tag to be localized so that a localized version of an image is displayed, but the src attribute is protected, the wrong image will show up. If your variable names are translated, your website might not even render correctly, or your application might not compile.

Custom coding that needs to be considered during localization

  • XML tags and attributes that need to be left untranslated
  • HTML tags and attributes that you want to make sure get translated:
    • “alt text” for images
    • “href” destinations for links
  • Custom code that should not be translated:
    • Variable names
    • Code segments
    • Custom tags

Customized content needs customized localization

There are instances where content needs to be treated differently. Maybe you don’t want some HTML attributes translated that normally would be (e.g. “alt text” for images). Maybe you have some attributes that need to be translated that normally wouldn’t be (e.g. a link’s “href”). Maybe you have custom tags that you want to be treated a specific way, or custom code within the text that you don’t want translators to touch.

For these situations, you will need a customized localization solution, such as a powerful TMS framework that uses highly customizable filters for your content. It can change which individual attributes are exposed for translation and customize how tags are treated. It can even define rules for what constitutes code within your text. This code will show up as tags that can be moved around within the text, so that it will be in the right position, but it cannot be edited.

Lingotek localization engineers customize the localization tools to fit your needs

Lingotek’s localization engineers are professionals who make sure that the content that you send for localization is treated as intended. There are several things that we do to set up your localization solution to make sure that your custom coding is treated appropriately:

  • Configure filters to protect or expose content for translation as needed.
  • Set up segmentation rules when default sentence segmentation may not be enough.
  • Prepare your content outside of the system, so that it will import and export seamlessly.
  • Test your content before, during, and after localization, so that you can be sure that it will work, every step of the way.

After everything is set up to meet your needs, you can relax, knowing that your custom code that shouldn’t be translated will be protected, and that the content that you want to be translated will be.

With our team of experienced localization engineers and Lingotek’s powerful, customizable localization solution, you can rest assured that your content is localized efficiently and accurately.

Do you have questions or want additional information about localization engineering and custom coding options? Contact us: US: +1(801)331-7777 UK: +44 (0)1628 421525 or go to

banner block

Want to Learn More?

Contact Me

It only takes 5 simple questions to determine if Lingotek is the right solution for your company.
Are you a translator? Click Here

banner block

Our Featured Customers

What makes Lingotek unique is our track record of building, powering and managing the most successful and vibrant brands in the world.


Lingotek Stats

Experience the Benefits of Networked Translation


Cost Savings
Software Only


Cost Savings
Software and Services


Translation Time Saved


Customizable Workflows Satisfaction


Latest Tweets