Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more information, please see the following sections: 

Table of Contents

 

To learn more about working with file format configurations, please see the following pages: 

 

Default Code File Configuration

...

  • Character Encoding
  • Translation of HTML Content
  • Quoted String Extraction
  • Quoted String Exclusion
  • Including or Excluding Additional Content
  • Text Segmentation Rules
  • Omitting Words, Terms, or Segments from the Translation

 

A Few Examples

The following are just a few examples of what you can do with a custom Code File configuration in Wordbee Translator. For more advanced examples, please see our Code File Questions and Answers page.

Tip

To learn more about common Code File configurations heard by our support team, please see the Code File Questions and Answers section.

...

Code File Configuration Options

When setting up a file format configuration for Code Files, there are many options to choose from to ensure extraction is successful. 

General Tab

The General Tab contains options for configuring the type of encoding, extracting HTML content, extracting quoted strings, excluding quoted strings, including or excluding additonal content, and text segmentation. The options are described in general below based on individual sections. 

Configuration OptionsDescription
Encoding

The default encoding selection for web pages is UTF-8; however, the encoding option may be used to select a different type of encoding such as Windows, Macintosh, ASCII, etc. An option is also provided for checking the encoding of a file to learn what encoding type is used.

 

HTML Content

This option should be enabled if the code file contains HTML content. By default, the option is disabled to ensure a successful online translation; however, if HTML content is present you will need to enable this option and choose an HTML configuration to use for the translation. Within this configuraiton section, you may also elect to split text at HTML breaking tags.

 

Extract Quoted Strings

Code files typically contain translatable text in quoted strings. By default, all quoted string are extracted, but you can add regular expressions within the "Exclude Quoted Strings" section of the configuration to exclude certain strings from the translation. The options in this section are specifically for handling the extraction of quoted strings and include:

  • Showing whitespaces at beginning and end to the translator.
  • Compressing sequences of whitespaces into a single whitespace.
  • Enabling the use of //notrans, //beginnotrans ... //endnotrans to delimit non-translatable code.

 

Exclude Quoted Strings

This configuration section may be used to define patterns to find and exclude specific quoted strings from translation. The system checks each pattern and if one matches the text, it is not extracted for translation.

Several pre-defined patterns exist within this section and are configured to not be translatable. They may be modified, marked as translatable or removed within this configuration section. You may also add new patterns to handle more specific translation needs.


Include or Exclude Additional Content

With this option you can do two things:

  1. Extract translatable content from any location of the file (not just quoted strings).
  2. Completely prevent sections or areas of the file from being translated. 

The expressions MUST contain capture groups named "pattern1", "pattern2", etc. Capture groups are extracted for translation. Example: @(?<pattern1>.*?)@ will extract any text delimited by "@".

Two expressions are pre-defined in this section:

  1. aI\((?<q1>("|'))\s*?text=\s*?(?<pattern1>.*?);.*?\k<q1>\) - Translatable
  2. aI\((?<q1>("|'))\s*?(?<pattern1>.*?)\k<q1>\) - Not Translatable

Within this section you may mark a pattern as translatable or not translatable, add descriptions for patterns, remove patterns, or add a new pattern.

 

Text Segmentation

This configuration section may be used to enable options for text segmentation during tranlsation. Here you can:

  • Enable/Disable SRX Rules for Text Segmentation
  • Elect to Always Split Text at Line Breaks

 

 

Do Not Translate Tab

The Do Not Translate Tab may be used to defined specific words, terms, or text segments to be excluded from the translation.

Configuration OptionDescription
Words or Terms

This feature lets you exclude single words, terms or portions of a segment from translation. Text captured by regular expressions are converted to markup and thus protected from modification. To obfuscate the original text, type a description. Otherwise the original content is shown when the translator hovers over the markup.