Translation Management

Placeholders (Strings)

Content is machine translated from English by Phrase Language AI.

Common placeholder formats that can be used in many localization file formats.

When selecting the correct placeholder format for a project:

  • Placeholders are highlighted in the editor window and can be checked and validated for presence in the translation.

  • Placeholders are automatically escaped when ordering translations and will not be modified by an external translator.

Enabling placeholder styles in your project

When creating or editing a project, specify the placeholder formats within the Placeholders tab of the Project settings window. Select all required format styles and see all matching placeholders highlighted immediately when working with in the editor and In-Context-Editor.

Placeholder conversion

Placeholder conversion is an attempt to reduce translation workload on multi-platform development. Use placeholder conversion if developing on multiple mobile platforms with the intention of sharing translations between platforms and don’t want to maintain a separate project for each platform. When downloading a locale via the application or API, use the convert placeholder format option. This format option can also be activated in the .phrase.yml configuration file. Placeholders in translations are converted to match format specific requirements.

Placeholder conversion is only available for the following localization file formats (placeholder conversion is limited to Android XML and iOS strings string format specifiers (cstyle placeholder style)):

Available placeholder formats for highlighting:

Name

Description

Examples

Rails i18n

Rails i18n style placeholders

%{count}, %{username}

Gettext Python

Gettext placeholders (python-format)

%(count)d, %(username)s, %(foo)

C-Style

C-Style format with and without positions

%1$s, %2$d, %d, %@, %1%@, %1$#@file@, %#@file@, %1$i, $%1$.2f, %.0f%, %ld, %c, %hi, %lu

.Net C#-Style

.Net C#-Style format

{0,10:C}, {0}, {1:hh}

Simple Message Properties

Simple Java Message Properties

{1}, {count}d, "{brackets}"

Laravel

Laravel placeholders beginning with a colon

:name, :NAME, :Name

Square Brackets

Placeholder with Square Brackets (BB-Code Style)

[u]abc[/u], [PLACEHOLDER]

Single Percentage

Placeholder with single enclosing percentage signs

%abc%

Double Percentage

Placeholder with Double Percentages

%%abc%%

Emoji

Emoji codes

:sob:, :smile:

Dollar Style

Placeholders with opening and closing $ signs.

$bc$, $.abc$, $!abc$, $+abc$, $-abc$, $-+.!abc$

NSIS

Placeholders with starting $ and closing/opening (curly)brackets.

${StdUtils.TrimStr}, $(StdUtils.TrimStr), ${String}

Razor Markup

Placeholder to highlight C# Razor expressions without code blocks

@DateTime.Now, @(DateTime.Now - TimeSpan.FromDays(3))

Double Curly

Placeholders with opening and closing double curly braces, e.g. for use with AngularJS.

{{number}}, {{foo.bar}}, {{username}}

Android XLIFF placeholders

Placeholders with opening <xliff:g> and closing </xliff:g>? e.g. for use with AndroidXml.

<xliff:g>%1s</xliff:g>,<xliff:g id_"star">★</xliff:g>

OASIS XLIFF placeholders

Placeholders with closed tag &lt;x id="YOUR_ID"&gt;, e.g. for use with Angular2.

<x id_"id" example="name"/>, <x id="id"/>

Liquid

Liquid style placeholders

{{count}}, {{username}}

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.