• Show convenient version of this site
  • Deutsch
  • English
Contact
Newsletter
  • Products
    • ALS
      • Across Language Server
        • Translation Management
        • Terminology Management
        • Translation Memory
      • Editions
      • Interfaces
    • ATE
      • Across Translator Edition
      • Editions
      • Download
      • Across Account
    • Elanion
      • Overview
      • Login
  • Solutions
    • Customers
      • Enterprises
      • Language Service Providers
      • Translators
    • Industries
      • E-Commerce & Trade
      • Pharmaceuticals & medicine
      • IT & Software
    • Departments
      • Marketing & E-Commerce
      • Technical Documentation
      • Software User Interfaces
  • Services
    • Hosting
    • Training
    • Consulting
  • Partners
    • Language Service Providers
    • Universities
    • Organisations
  • Company
    • Across Systems
    • News
    • Events
    • Career
    • Contact
  • Knowledge
    • Blog
    • Video Library
    • Case Studies
    • White Papers
    • Fact Sheets
    • File Formats
    • Expert Features
  • Support
    • Online Help
    • FAQ
    • Support Request
    • Updates
    • New Functions
Schedule Consultation
  • Online-Help
  • SDK
  • APIs
  • crossTank API v2
  • crossTank API v2 Overview
  • Formatting and Auto-Adjustment of Formatting and Numbers
  • General Information
    • Connectors
    • LCIDs
    • GUIDs
    • Paragraph states and flags
    • crossTerm Web
    • crossTransform
      • crossTransform - examples
  • Connecting Third-party Systems
    • crossConnect for content systems
      • Requirements
      • Configuration
        • Configuring the connector
        • Job configuration
        • Testing crossConnect
      • Troubleshooting
    • crossConnect for External Editing
      • Purpose and usage
        • Use case - Machine translation
        • Use Case - Review and QA
        • Use case - Machine review
      • Requirements
      • Implementation
        • Across XLIFF format
          • Across-specific Extensions
          • <xliff> Element Attributes
          • <file> Element Extensions
          • <trans-unit> Element Extension
          • Paragraph States
          • Paragraph State Flags
          • <source> and <target> Element Content
          • <bpt> Element Attributes
          • <ph> Element Attributes
          • <x> Element Attributes
          • Across-specific Properties
          • Analysis Results
          • Sample Files
          • Across XLIFF - import, export and segmentation
          • Context information
          • Exporting best matches in Across XLIFF
          • Hyperlinks to XLIFF
        • Secure file handling with C#
        • Secure file handling with JAVA
        • Workflow and vendor configuration
          • Adding workflows to crossAutomate Host Manager
          • Adjusting preset watchfolders
          • The filter rules
          • External editing workflows
        • Sample code - Integrated solution
    • Generic File Connector
      • Process Overview
      • Exchange Folder Structure
      • Package Format
        • Control File
  • Display Texts
    • Solution approaches
    • The Across solution in detail
    • Requirements
    • Integration
    • The display text format
      • Line height vs. line spacing
      • DT-XML format structure
        • DT-XML - Main elements
        • Children of paragraphStyles and characterStyles
        • Children of the sizeInfos element
        • Children of the paragraph element
        • DT-XML v5 example
        • DT-XML v4 example
    • The display text package
      • Creating a display text package
  • APIs
    • APIs - Technology
    • crossTank API v1
      • Requirements
      • Testing the crossTank API installation
      • OData-URLs in Chrome
      • Example
    • crossTank API v2
      • Requirements
      • QuickStart
        • Searching for Translations
        • Creating Translations
      • crossTank API v2 Overview
        • Finding Translations
        • Creating Translations
        • Translation Properties
        • Formatting and Auto-Adjustment of Formatting and Numbers
      • C# Example
    • crossTerm API v1
      • Scenarios of use
        • Example - usage information
        • Example - finding terms
      • Requirements
      • Special Controllers
      • OData-URLs in Chrome
      • crossTerm API with C#
      • crossTerm API with Java
      • crossTerm API with JavaScript
    • crossTerm API v2
      • Requirements
      • QuickStart
        • Authentication Basics
        • First Request Examples
      • crossTerm API v2 Example in C#
        • Used Functions
      • crossTank API, crossTerm API v2 - Authentication
      • crossTerm API v2 - Examples of Use
        • Finding Terms of Entry
        • Searching Terminology via API
    • crossAPI SI
      • Requirements
      • Function Return Types
      • crossAPI SI and Java
        • Example: hot integration
        • Executing the hot integration example
      • List of Objects in crossAPI SI
        • AssignManager
        • Authorization
        • CheckInManager
        • CheckOutManager
        • CrossTankManager
        • CrossTermManager
        • DocumentManager
        • FileManager
        • LanguageJobManager
        • LanguageManager
        • LicenseManager
        • Message
        • ObjectManager - Overview
          • Part 1
          • Part 2
          • Part 3
        • ReportManager
          • ID values for analysis and analysis-result
        • ProjectManager - Overview
          • Part 1
          • Part 2
          • Attribute Information
        • SqlQuery
        • SystemManager
        • TaskManager
        • WanGridManager - Overview
          • Part 1
          • Part 2
      • Sample - transferring checkout files via FileManager
      • Sample - VBS
    • Text Preprocessing API
      • Introduction
      • How to browse the API
      • Sentence splitting
      • Abbreviations

Formatting and Auto-Adjustment of Formatting and Numbers

crossTank API v2 supports passing formatting, tags/placeables, and numbers when creating or searching for translations. Auto-adjustment of formatting and tags and auto-changing of numbers can be enabled for searching translations.

In this topic, the usage of formatting, tags, and numbers is explained using basic examples.

Format Ranges

crossTank supports formatting of text by applying ranges of formatting (e.g. bold font, font size 18, etc.) over the text. Text which isn't covered by explicit format ranges is displayed in the base font style. Styles of format ranges are combined with the base font style of a sentence when a format range is displayed. In order to make the auto-adjustment algorithm work correctly on created translations, identical styles must have unique IDs in the scope of the sentence which are identical between source and target sentences. That way, the auto-adjustment algorithm can match source and target formatting ranges. The beginning of a format range includes the character, the end of a format range doesn't include the character, e.g., the format range begin:0, end:2 covers the first three characters of a segment.

Example

Source sentence
Target sentence
This is the firstsentence.
Dies ist der ersteSatz.

Format ranges example

"Source": { 
  "Text": "This is the first sentence.", 
  "Language": 9, 
  "FormatRanges": [ 
    { 
      "Begin": 0, 
      "End": 4, 
      "FontStyle": { 
        "StyleId": 0, 
        "Bold": true 
      } 
    }, 
    { 
      "Begin": 12, 
      "End": 17, 
      "FontStyle": { 
        "StyleId": 1, 
        "Bold": true, 
        "Italic": true 
      } 
    }, 
    { 
      "Begin": 18, 
      "End": 27, 
      "FontStyle": { 
        "StyleId": 2, 
        "Bold": true 
      } 
    } 
  ], 
           
  "BaseFontStyle": { 
    "StyleId": 2, 
    "FontSize": 12 
  } 
}, 
"Target": { 
  "Text": "Dies ist der erste Satz.", 
  "Language": 7, 
  "FormatRanges": [ 
    { 
      "Begin": 0, 
      "End": 4, 
      "FontStyle": { 
        "StyleId": 0, 
        "Bold": true 
      } 
    }, 
    { 
      "Begin": 13, 
      "End": 18, 
      "FontStyle": { 
        "StyleId": 1, 
        "Bold": true, 
        "Italic": true 
      } 
    }, 
    { 
      "Begin": 19, 
      "End": 23, 
      "FontStyle": { 
        "StyleId": 2, 
        "Bold": true 
      } 
    } 
  ], 
           
  "BaseFontStyle": { 
    "StyleId": 2, 
    "FontSize": 12 
  } 
}

Elements

crossTank supports elements inside text, which may be used to represent tags in markup formats or locked content. In order to make the auto-adjustment algorithm work correctly on created translations, elements must have IDs which are unique IDs in the scope of the sentence and identical between source and target sentences. That way the auto-adjustment algorithm can match source and target elements. Elements are not considered characters and therefore take no space in the text. If several elements have identical positions, they are displayed in the same order as they are specified. Moreoever, they are always displayed to the left side of the character at the same position. Elements which are placed at the end of a text have an index outside the text range. Please note that source or target segments cannot contain only placeables, but must also contain at least one character.

Example:

Source sentence
Target sentence
element1element2This is the first sentence.element3
element2element1Dies ist der erste Satz.element3

Elements example

"Source": { 
      "Text": "This is the first sentence.", 
      "Language": 9, 
      "Elements": [ 
        { 
          "ElementId": 0, 
          "Position": 0, 
          "Text": "<ELM1>", 
        }, 
        { 
          "ElementId": 1, 
          "Position": 0, 
          "Text": "<ELM2>", 
        }, 
        { 
          "ElementId": 2, 
          "Position": 22, 
          "Text": "<ELM3>", 
        } 
      ] 
    }, 
          
    "Target": { 
      "Text": "Dies ist der erste Satz.", 
      "Language": 7, 
    "Elements": [ 
        { 
          "ElementId": 1, 
          "Position": 0, 
          "Text": "<ELM2>", 
        }, 
        { 
          "ElementId": 0, 
          "Position": 0, 
          "Text": "<ELM1>", 
        }, 
        { 
          "ElementId": 2, 
          "Position": 27, 
          "Text": "<ELM3>", 
        } 
      ] 
}
Tip

If you want to store a translation with unlinked elements or styles, it is recommended that you set IsForceCheckLLSStyleAndPositions = true (allow storing of formatting as is); otherwise, it is recommended that you set this flag to false.

Numbers

crossTank processes numbers during storing and searching using the auto-change algorithm. This adds some limitations for storing and search options to preserve the correct behavior.

When translating sentences with numbers, there are several cases:

Case #
Source sentence (EN)
Target sentence (DE)
Number value
Number type
Number count
Number order
Result
1
Number 10
Nummer 10
icn_haken-gruen
icn_haken-gruen
icn_haken-gruen
icn_haken-gruen
icn_haken-gruenAdjustment of numbers possible
2
Number 1
Nummer 2
icn_kreuz-rot
icn_haken-gruen
icn_haken-gruen
icn_haken-gruen
Adjustment of numbers impossible
3
Number 10
Nummer 10.0
icn_haken-gruen
icn_kreuz-rot
icn_haken-gruen
icn_haken-gruen
Adjustment of numbers impossible
4
Numbers 1 2
Nummer 1 2 3
icn_haken-gruen
icn_haken-gruen
icn_kreuz-rot
icn_haken-gruen
Adjustment of numbers impossible
5
Numbers 1 2
Nummer 2 1
icn_haken-gruen
icn_haken-gruen
icn_haken-gruen
icn_kreuz-rot
Adjustment of numbers impossible
  • When you store translation like in case 1, it is recommended that you set the following combination of flags:
  • FieldProcessingMode = CheckTypeOnly (avoids creating translation duplicates "Test 1" → "Test 1", "Test 2" → "Test 2" etc.)
  • IsUncontrolled = false (allow adjustment of numbers for this translation. "Test 1" → "Test 1" can be adjusted to "Test 2" → "Test 2" according to search pattern)
  • For all other cases where the numbers do not match, it is recommended that you set the following combination of flags:
  • FieldProcessingMode = CheckTypeAndValue (allows saving the translation as is)
  • IsUncontrolled = true (allows searching for the translation as is without applying adjustment of numbers)

Auto-Adjustment

By default, the similar search performs auto-adjustment of numbers and formatting to return results maximally similar to the search pattern. The adjustments add a penalty to the similarity score of the respective search result.

Examples:

Source pattern
Original source
Original target
Adjusted source
Adjusted target
Number 123,456
Number 1
Nummer 1
Number 123,456
Nummer 123.456
This is a test sentence
This is a test sentence
Das ist ein Testsatz
This is a test sentence
Das ist ein Testsatz
element1Thiselement2 is a element3testelement4 sentence
This is a test sentence
Das ist ein Testsatz
element1Thiselement2 is a element3testelement4 sentence
element1Daselement2 ist ein element3Testsatzelement4
Test element1elementselement2
Test tag1elementstag2
Test-tag1Elementetag2
Test element1elementselement2
Test-element1Elementeelement2
Register for our Newsletter now

Our newsletter provides you with exclusive news about the Across Language Server, often even before the official announcement. The newsletter also provides you with early information on events, webinars, and training sessions.

  • Legal Notice
  • GTC
  • Privacy Statement
  • Cookies
  • info@across.net