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
Implements
Inherited Members
Namespace: UnityEngine.Localization.Pseudo
Assembly: Unity.Localization.dll
Syntax
[CreateAssetMenu(menuName = "Localization/Pseudo-Locale", fileName = "Pseudo-Locale(pseudo)")]
public class PseudoLocale : Locale, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
Methods | The pseudo localization methods that will be applied to the source text. |
Methods
Name | Description |
---|---|
CreatePseudoLocale() | Create a new instance with default values. |
GetPseudoString(string) | Returns a pseudo-localized string using Methods. |