docs.unity3d.com
    Show / Hide Table of Contents

    Class PseudoLocale

    The PseudoLocale can be added to a project to enable Pseudo-localization. Pseudo-localization is a method for testing internationalization aspects of your game. Pseudo-localization can help highlight issues that may occur when translating into different languages. For example, it can help to highlight areas where there may not be enough space for translated text or where the text is hard coded or built in a way that will be difficult to localize(word order).

    Typically pseudo-localization can be used to highlight the following issues:

    • Text length that is significantly longer than the source language, and does not fit within the UI constraints, or which causes text breaks at awkward positions. On average, expect an English string to increase in length by 30% when translating to another language. See Expander, Encapsulator
    • Vertical height issues caused by Font glyphs that are significantly larger than, or possess diacritic marks not found in, the source language, and which may be cut off vertically. See Accenter
    • Right-to-left issues from languages for which the reading order is not left-to-right, which is especially problematic for user input.
    • Missing Font characters. Some fonts may have a limited character set that will not accommodate non ASCII character sets. See CharacterSubstitutor, Accenter
    • Word order issues. Text that is concatenated from multiple strings will often assume the words will always follow the same order, however when localized the order may change. Pseudo-localization can highlight where text has been constructed in this manner. See Encapsulator

    Inheritance
    Object
    Locale
    PseudoLocale
    Inherited Members
    Locale.Identifier
    Locale.Metadata
    Locale.SortOrder
    Locale.LocaleName
    Locale.GetFallback()
    Locale.UseCustomFormatter
    Locale.CustomFormatterCode
    Locale.Formatter
    Locale.CreateLocale(String)
    Locale.CreateLocale(LocaleIdentifier)
    Locale.CreateLocale(SystemLanguage)
    Locale.CreateLocale(CultureInfo)
    Locale.CompareTo(Locale)
    Locale.Equals(Locale)
    Namespace: UnityEngine.Localization.Pseudo
    Syntax
    public class PseudoLocale : Locale, IEquatable<Locale>, IComparable<Locale>, ISerializationCallbackReceiver

    Properties

    Methods

    The pseudo localization methods that will be applied to the source text.

    Declaration
    public List<IPseudoLocalizationMethod> Methods { get; }
    Property Value
    Type Description
    List<IPseudoLocalizationMethod>

    Methods

    CreatePseudoLocale()

    Create a new instance with default values.

    Declaration
    public static PseudoLocale CreatePseudoLocale()
    Returns
    Type Description
    PseudoLocale

    GetPseudoString(String)

    Returns a pseudo-localized string using Methods.

    Declaration
    public virtual string GetPseudoString(string input)
    Parameters
    Type Name Description
    String input
    Returns
    Type Description
    String
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023