Localization is key to ensuring an exceptional user experience across diverse languages and regions. This article provides an overview of how localization is handled within our system, focusing on date formats, word declension, and pricing. It also outlines best practices for managing these aspects effectively.
By leveraging automation and best practices, our localization system ensures consistency across date, text, and pricing formats. While some constraints exist, such as the inability to fully customize date formats or plural forms, the standardized approaches outlined here provide flexibility for most use cases.
Date Format Customization
Date formatting is managed through a library that automatically adjusts formats based on either the default configured language or the user's selected locale, if multiple languages are available on multi-lingual or international sites. This ensures that dates are displayed in a familiar, intuitive manner for users.
Where Date Localization Applies:
-
End-users: Dates in My Account, checkout, login/registration flows, and email notifications are adapted to their locale.
-
Client users (team members): Dates in the Piano dashboard reflect the locale of the user accessing the interface (if dashboard localization is enabled).
Key Principles for Date Localization:
-
Automated Formatting: The library determines the formatting (e.g., day/month/year order) based on locale.
-
Uniformity Within Locales: All users within the same locale see identical date formats. This includes for example email date variables like
{{subscription_previous_billing_date}}. -
Locale-Dependent Formats: Users from different locales will see date formats tailored to their language and regional preferences.
Examples:
-
EN-US: August 6, 2017
-
DE-DE: 6. August 2017
While the system currently does not allow clients to customize date formats in email notifications, date formats within templates can still be adjusted, for example as described here.
Localizing Language-Specific Grammar, Plurals, and Declensions
Languages with complex grammatical rules may pose unique localization challenges, particularly when text includes variables that may appear in singular or plural forms.
Recommended Approach for Pluralization:
-
Adaptable phrasing that can accommodate plural variations, such as:
-
{0} month(s) -
{0} resource(s) -
every {0} month(s)
-
-
Provide translations that account for multiple plural forms or grammatical cases in a clear and concise manner. Examples:
-
For German:
{0} Monat(e) -
For Slovak:
každý(é/ých) {0} mesiac(e/ov) -
Avoid lengthy or ambiguous translations with multiple slashes (e.g.,
každý/každé/každých {0} mesiace/mesiacov) as they can be confusing in broader contexts.
-
Constraints:
-
Only one translation per source key is allowed within the Localization dashboard.
-
For languages with multiple plural forms, use a format that works across all scenarios to maintain clarity.
Localizing Prices and Currencies
Pricing localization involves adapting amounts and currencies based on the user’s locale and includes several considerations:
What’s Localized:
-
Numeric Formatting: Decimal and thousand separators (e.g., 1.99 vs. 1,99).
-
Currency Display: Placement and style of the currency symbol (e.g., $0.99 for EN-US vs. 5,99 USD for RU-RU).
-
Translation of Tax Terminology: Localization of tax-related terms.
-
Word Order: Adapting the sequence of elements (e.g., amount before or after currency).
Example:
For a user with RU-RU locale, the same offer might display as:
5,99 USD
This differs from EN-US, where it might appear as:
$0.99
The system combines the currency, amount, and selected locale to generate a price formatted appropriately for the user-friendly display.