Capturing Content

Create Patterns for Dynamic Content

This article is for Account Owners and Project Managers using the Global Delivery Network.

Pattern matching rules can be used to help reduce the cost of translating repetitive text on your website that contains dynamic variables.

For example, an order confirmation page may display a message after a customer completes an order:

Thank you, your order number is 56783

Each time a new order is placed, the same text string appears, but with a different order number. You need to translate the text, but not the order number.

By default, the Global Delivery Network will recognize each of these confirmation messages as unique due to the different order numbers. By creating a pattern rule for the order number sequence in this message, you can allow the repetitive text to be translated one time in Smartling, and pass through the dynamic order number unchanged. This will reduce your translation costs.

After creating a pattern matching rule, the static messages would be capture in Smartling once with the order number masked:

Thank you, your order number is {0}

Other examples of repetitive text with dynamic variables could be:
Hello Susan
Page 3 out of 10
You have 4 items in your cart

This article describes how to create and manage Patterns in the Smartling Dashboard. You can also create patterns for dynamic content using the No Translate class in your source code.

Create a Pattern (Classic)

  1. After you have captured content in the Authorization Queue of a Global Delivery Network project type, select any instance of a string you want to create a pattern for by using the checkbox next to the string.
  2.  Click Actions > Create Pattern.
  3. Your string text will be displayed in the gray text box at the top of the pattern rule prompt.
  4. Double click or highlight text in the string you want to mask
  5. Click the +Placeholder from selection button
  6. Configure the parameters to match in the What to Match prompt
  7. Click outside of the What to Match prompt
  8. Once you have created all desired parameters, click the Apply Pattern button to save or Reset Pattern to start over

Each time you click out of the What to Match prompt, the white textbox below will dynamically update to show you all strings in the Authorization Queue that match your current pattern parameters, and that will be deleted if the pattern is created. You can prevent certain strings from being deleted by clicking Keep String

Pattern matching parameters

Range Type

  • At least: Sets a minimum quantity of matching text
  • Exactly: Sets an exact quantity of matching text
  • Between: Sets a range for matching text

Quantity: sets quantity for range type

Character Type

  • Characters: Matching text can be any characters, including digits and spaces
  • Digits: Matching text can only contain digits

Match Partial String: allow

Delete or Deactivate a Pattern (Classic)

After a pattern rule is created, it will be displayed in Content > Patterns. To Delete or Deactivate:

  1. Click on Content > Patterns
  2. Click Delete to permanently delete a pattern rule. Click Deactivate to deactivate a rule. Deactivated rules will remain in your Patterns tab, and can be re-activated at any time.

You can only delete patterns from the Patterns tab that were created in the List View. If a pattern was created by tagging your source code, contact your technical team to remove the pattern markup. If a pattern was created by Smartling using custom integration, contact your Customer Success Manager to have the rule removed.

Pattern rules are automatically deactivates if no new content has matched a given rule in the past 6 months. If you still want the pattern rule to be active, you'll need to reactivate the rule within the Smartling Platform by clicking on Content > Patterns > Activate.


Create patterns on content in the Awaiting Authorization queue

The system will automatically remove all strings matching a newly created pattern from the authorization queue, saving you the time. Patterns can be created on content in the In Progress queue, however you will have to manually un-authorize and delete any matching strings from your project.

Patterns can also be used to systematically exclude content

If you don't have developer resources available to add No Translate Class to elements in your source code that should not be translated, you can use pattern rules to identify a set of repetitive strings and exclude matches from translation.

To do this, create a pattern as described above. After the masked version of the string is re-captured in Smartling, exclude the string. Any strings matching this pattern will appear in your source language on your translated sites.

Be mindful of greedy pattern rules

If a pattern is too greedy, you may mask more content than you intended. Limit patterns to a certain number of characters, range of characters, or digits to make rules more specific.


You've captured email address strings from a contact page on your website that you don't want to translate:

You create a pattern matching rule for 1+characters@1+characters

This pattern will match the email addresses above, but also any text on your website that contains an @ character, such as:

Contact for a free demo
which you may want translated.

Instead, make the pattern more strict. For example,
1-10 characters@1-15

Label masked text to provide additional information to translators

After a pattern rule has been created, you can label rule parameters that mask dynamic text to provide information to translators that can help improve translation accuracy.


The pattern Welcome, {0} could be updated to display as Welcome, {First Name} in the CAT tool by labeling the masking parameter. The translator now has insight about what type of data is being masked in this string, which may influence their translation.

To label a rule parameter:

  1. Click on Content > Patterns from within a Global Delivery Network project.
  2. Click on the yellow parameter token you want to label.
  3. Enter a label in the Placeholder Label field.
  4. Click the x to save your change and exit the prompt.

Was this article helpful?