Applanga App Localization Logo
  • Product
    Overview How it works Features Integrations
  • Resources
    Blog Whats New About Us Solutions Documentation FAQ
  • Pricing
  • Contact
  • See a Demo
  • Login
  • Try for free
  • DocumentationDocs
  • The Translation Editor & String Management InterfaceString Management
  • Variables

Variables

How to Use Variables & Placeholders

Aysha 
Written by Aysha
Updated over a week ago

This article will explain Applanga variables and placeholders and how they are utilized in Applanga projects.


Table of Contents

  1. What are Variables?
  2. Variables and Translation Orders
  3. Named Variables
  4. Android/iOS Placeholder Conversion
  5. How to Find Instances of Missing Variables

What are Variables?

Applanga merges multiple concepts under the term Variables on the dashboard:

  1. Content formatted like HTML and/or XML meaning everything between <> angle brackets
  2. C-style String Formatting starting with a % that are being used in slight variations on Android, iOS, and other software development frameworks to insert dynamic strings, numbers, dates, and other wildcards into static translated strings e.g. %@ (iOS String) or %s (Android String)
  3. Placeholders and other Ordered Formatters between Curly Brackets/Braces {} like they are used in C# and Angular projects for example {0} (C#), or { {var_name} } (AngularJS)
  4. ICU Message Syntax that is a part of strings for plurals, time, dates, and variables that are switched based on context such as gender. Often used in arb files, yaml, po and other file types. See the ICU Syntax article for more information.
  5. Applanga’s Named Variables are a means of providing a cross-platform compatible placeholders starting with a % followed by the variable name in Curly Brackets/Braces {} e.g. %{VARIABLE_NAME}

On the Applanga dashboard placeholders are often referred to as Variables, except for placeholder conversion between android and iOS. When uploading strings to the Applanga dashboard, placeholders found within strings are included in the upload. Applanga variables ensure that placeholder content within source strings are included in the target string.

Variables are highlighted in grey in the Editor / String Management Interface.


Back to Top

Variables and Translation Orders

If content with variables is included in translation orders via the Applanga Order menu, variables are removed from the editable text. The TransPerfect translators will not be able to alter the content inside a variable. This prevents any accidental issues with the code such as the removal of a bracket. When translations are delivered, they will contain the variable placed at the most appropriate section of the sentence by the translator.

If the content within variables needs to be translated, the variables can be removed from the string via the Editor interface. However, this might have an impact on the application that will be ingesting the content.


Back to Top

Named Variables

The Applanga SDK offers a named argument feature for writing variables in a style that is supported on both iOS and Android. All arguments must be written like the following example:

%{argument}

See the Applanga SDK Integration Documentation for more details.


Back to Top

Android and iOS Placeholder Conversion

The Applanga SDK and CLI includes a new feature to convert iOS and Android placeholders within strings. Placeholder conversion reduces the translation workload for multi-platform projects. If you are developing for multiple platforms and plan to share your translations between the platforms, our placeholder conversion can help. See the Placeholder Conversion article for more details.


Back to Top

How to Find Instances of Missing Variables

If a key has a variable in the source value and that variable is completely missing or even just slightly different in the target value, the String Management Interface generates a warning. Users can filter to locate those strings with the missing variables filter.

  1. Navigate to the String Management Interface for a specific project, then click the filter icon on the right hand side.
  2. Hover on With Issues then click Variable Missing
  3. This filter will display any translations returned with missing variables


Back to Top

Product Details
  • Overview
  • How it works
  • Features
  • Integrations
  • Demo
  • Pricing
  • App Localization
  • Android Localization
  • iOS Localization
  • Unity Localization
Information Hub
  • Blog
  • Whats New?
  • How-to?
  • Documentation
  • iOS Integration
  • Android Integration
  • Unity Integration
  • React Native
  • Flutter
  • Rest API
  • Supported File Formats
  • Command Line Interface
  • Solutions
  • FAQ
Company
  • Home
  • About Us
  • Contact
  • Jobs
  • Terms of Service
  • Privacy Policy
  • Imprint
From our Blog
  • • How to use a custom SSO Provider (Microsoft Azure Active Directory)
  • • How to Add Screenshots from Design Files to App Strings
  • • How to use a custom SSO Provider (PingIdentity SSO)
  • • Applanga Webinar - Android SDK
  • • How to Use Applanga for Multi-Platform Localization
  • • Preparing for Localization
  • • 6 Ways to Clean Up Applanga Projects
  • • Applanga Webinar - Translation Review
  • • Q4 2021 Release Notes
Stay up to date
Undecided or News Hungry?
Subscribe to our newsletter to get
the latest updates on Applanga's development!
Subscribe

©  All rights reserved. Mbaas Development GmbH.

Thank you!

We have received your request and will get back to you asap!

Contact Us

Email successfully sent

Marketing Permissions

Mbaas Development GmbH will use the information you provide on this form to be in touch with you and to provide updates and marketing. Please let us know all the ways you would like to hear from us:

Email

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at privacy@applanga.com. We will treat your information with respect. For more information about our privacy practices please visit our website. By clicking below, you agree that we may process your information in accordance with these terms.