reckfellENGINE

TranslationDomain

Catalog set with independent locale selection and pseudolocalization settings.

On this page
class TranslationDomainReckfellSharpInherits RefCounted

A RefCounted object rather than Resource or Entity. A new domain is enabled, empty and not automatically connected to TranslationServer or UI. AddTranslation retains resource references: re-adding the same object is idempotent, while distinct resources of one locale are allowed. GetTranslations returns a separate container holding the same objects; do not dispose returned elements as newly owned resources. Dispose an owned domain after use.

Translate searches for a nonempty message using the override or current server locale, then the server fallback locale, within catalogs registered in this domain. A more specific locale is preferred per message, while a missing entry permits a less specific matching catalog. Equal-score candidate order is unspecified: use nonoverlapping keys rather than AddTranslation ordering. Empty translations count as misses.

On a miss, Translate returns the source key; TranslatePlural chooses source singular only at n==1 and source plural otherwise. Enabled=false bypasses catalogs and automatic pseudolocalization. In SDK 1.0.0 automatic pseudolocalization applies only to Translate: TranslatePlural does not apply it even to a found translation. Explicitly Pseudolocalize the returned text when required.

FindTranslations and HasTranslationForLocale with exact=true compare locale text literally: ru-RU differs from stored ru_RU. exact=false uses CompareLocales and returns all matching catalogs rather than just the best. Domain settings do not automatically recreate existing UI text. Windows headless checks covered lookup, fallback, references, container copies and string transforms; real RTL layout, UI refresh, all languages and equal-score priority were not tested.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TranslationDomainConstructor
# TranslationDomain
C#
public TranslationDomain();

Creates an owned enabled domain without catalogs or a locale override. Automatic pseudolocalization is off, accents/placeholder skipping on, wrappers are square brackets and ratio=0. Registers the domain with neither server nor UI. Dispose after use.

Properties10

EnabledProperty
# Enabled
C#
public bool Enabled { get; set; }

Enables Translate/TranslatePlural lookup, default true. false returns the source key or singular/plural at n==1, bypassing catalogs and automatic pseudolocalization. Does not block explicit Pseudolocalize or clear resources.

PseudolocalizationAccentsEnabledProperty
# PseudolocalizationAccentsEnabled
C#
public bool PseudolocalizationAccentsEnabled { get; set; }

Replaces ASCII letters using a built-in accent table, default true. Not a language translation; some replacements contain multiple code points. Runs after vowel doubling and before fake bidi/wrapping. Does not automatically refresh UI.

PseudolocalizationDoubleVowelsEnabledProperty
# PseudolocalizationDoubleVowelsEnabled
C#
public bool PseudolocalizationDoubleVowelsEnabled { get; set; }

Doubles ASCII a/e/i/o/u in both cases, default false. Does not double all vowels of every language. Runs before accents and can skip recognized placeholders. Does not refresh existing labels.

PseudolocalizationEnabledProperty
# PseudolocalizationEnabled
C#
public bool PseudolocalizationEnabled { get; set; }

Automatically transforms the Translate result, default false. Does not affect TranslatePlural in the current implementation. Explicit Pseudolocalize works regardless of this flag. Changing it does not refresh already assigned UI text.

PseudolocalizationExpansionRatioProperty
# PseudolocalizationExpansionRatio
C#
public float PseudolocalizationExpansionRatio { get; set; }

Additional underscore-padding ratio, default 0. Each side gets the integer part of originalLength*ratio/2, so a short string may not grow. Uses pre-transform input length rather than pixel width. The setter does not clamp; supply a finite nonnegative reasonably bounded value.

PseudolocalizationFakeBidiEnabledProperty
# PseudolocalizationFakeBidiEnabled
C#
public bool PseudolocalizationFakeBidiEnabled { get; set; }

Adds U+202E/U+202C controls around text and individual lines, default false; recognized placeholders are placed outside those spans. A diagnostic transform rather than real RTL translation or automatic UI mirroring. Test real-language shaping and layout separately.

PseudolocalizationOverrideEnabledProperty
# PseudolocalizationOverrideEnabled
C#
public bool PseudolocalizationOverrideEnabled { get; set; }

Replaces code points with asterisks, default false, except recognized skipped placeholders. Runs before vowel doubling and accents. Helps find strings bypassing localization; not a secret-data masking facility.

PseudolocalizationPrefixProperty
# PseudolocalizationPrefix
C#
public string PseudolocalizationPrefix { get; set; }

Literal text before transformed nonempty content and left padding, default [. Not looked up in catalogs or extended with a locale name. Empty input receives no wrapping.

PseudolocalizationSkipPlaceholdersEnabledProperty
# PseudolocalizationSkipPlaceholdersEnabled
C#
public bool PseudolocalizationSkipPlaceholdersEnabled { get; set; }

Preserves recognized two-character placeholders %s, %c, %d, %o, %x, %X and %f during domain transformations. Does not protect C# {0} or a width specifier such as %02d.

PseudolocalizationSuffixProperty
# PseudolocalizationSuffix
C#
public string PseudolocalizationSuffix { get; set; }

Literal text after transformed nonempty content and right padding, default ]. Not looked up in catalogs. Empty input receives no wrapping.

Methods33

AddTranslationvoid
# AddTranslation
C#
public void AddTranslation(Translation translation);

Adds a Translation to this domain. Does not automatically add it to the main game domain or assign a domain to UI objects.

Parameters
NameTypeDefault
translationTranslation—
translation

Non-null Translation with the intended Locale and messages. The example adds separate en and ru resources.

Clearvoid
# Clear
C#
public void Clear();

Removes all domain catalog references. Retains Enabled, locale override and all pseudolocalization settings; clears no messages inside the resources.

FindTranslationsReckfell.Collections.Array<Translation>
# FindTranslations
C#
public Reckfell.Collections.Array<Translation> FindTranslations(string locale, bool exact);

Returns a separate Array<Translation> of all matching resources. exact=true compares locale literally without standardization; false selects every CompareLocales>0 match. Does not sort by specificity, search for a message or add the server fallback locale. Elements are shared resources rather than copies.

Parameters
NameTypeDefault
localestring—
exactbool—
locale

Locale such as ru_RU. Standardize first for exact=true; SetLocaleOverride normalizes nonempty input and clears the override for empty input.

exact

true for literal Locale equality; false for any positive CompareLocales match rather than just the best candidate.

Returns Reckfell.Collections.Array<Translation>

New container of shared Translation objects; empty when none match.

GetLocaleOverridestring
# GetLocaleOverride
C#
public string GetLocaleOverride();

Reads the domain's explicit locale override. This lets a tool follow editor language without changing global project locale.

Returns string

Nonempty override or an empty string to follow TranslationServer locale.

GetPseudolocalizationExpansionRatiofloat
# GetPseudolocalizationExpansionRatio
C#
public float GetPseudolocalizationExpansionRatio();

Reads PseudolocalizationExpansionRatio. Additional underscore-padding ratio, default 0. Each side gets the integer part of originalLength*ratio/2, so a short string may not grow. Uses pre-transform input length rather than pixel width. The setter does not clamp; supply a finite nonnegative reasonably bounded value.

Returns float

Stored PseudolocalizationExpansionRatio value rather than proof of refreshed layout.

GetPseudolocalizationPrefixstring
# GetPseudolocalizationPrefix
C#
public string GetPseudolocalizationPrefix();

Reads PseudolocalizationPrefix. Literal text before transformed nonempty content and left padding, default [. Not looked up in catalogs or extended with a locale name. Empty input receives no wrapping.

Returns string

Stored PseudolocalizationPrefix value rather than proof of refreshed layout.

GetPseudolocalizationSuffixstring
# GetPseudolocalizationSuffix
C#
public string GetPseudolocalizationSuffix();

Reads PseudolocalizationSuffix. Literal text after transformed nonempty content and right padding, default ]. Not looked up in catalogs. Empty input receives no wrapping.

Returns string

Stored PseudolocalizationSuffix value rather than proof of refreshed layout.

GetTranslationObjectTranslation · Deprecated
# GetTranslationObject
C#
public Translation GetTranslationObject(string locale);

Obsolete SDK method returning one best-matching resource or null; equal-score order is unspecified. Searches for no specific message and promises no fallback-locale resource. Use FindTranslations with explicit exact for a list and Translate/TranslatePlural for lookup. The returned resource is shared.

Parameters
NameTypeDefault
localestring—
locale

Locale such as ru_RU. Standardize first for exact=true; SetLocaleOverride normalizes nonempty input and clears the override for empty input.

Returns Translation

One shared resource or null; obsolete API without equal-score selection guarantees.

GetTranslationsReckfell.Collections.Array<Translation>
# GetTranslations
C#
public Reckfell.Collections.Array<Translation> GetTranslations();

Returns a separate Array<Translation> container of all added resources without an ordering guarantee. Clearing the array changes no domain membership; editing an element changes the shared resource. Do not dispose elements as newly created objects.

Returns Reckfell.Collections.Array<Translation>

New shared-resource container without sorted-order or priority guarantees.

HasTranslationbool
# HasTranslation
C#
public bool HasTranslation(Translation translation);

Tests membership of the same Translation object rather than matching Locale or contents. An empty catalog can also be registered.

Parameters
NameTypeDefault
translationTranslation—
translation

Non-null Translation object; membership/removal uses object identity.

Returns bool

true only when that object is present.

HasTranslationForLocalebool
# HasTranslationForLocale
C#
public bool HasTranslationForLocale(string locale, bool exact);

Tests whether at least one catalog matches the locale. exact=true is literal comparison; false uses CompareLocales>0. Tests neither a message key, catalog population nor fallback.

Parameters
NameTypeDefault
localestring—
exactbool—
locale

Locale such as ru_RU. Standardize first for exact=true; SetLocaleOverride normalizes nonempty input and clears the override for empty input.

exact

true for literal Locale equality; false for any positive CompareLocales match rather than just the best candidate.

Returns bool

true for a matching locale even if the needed message is absent.

IsEnabledbool
# IsEnabled
C#
public bool IsEnabled();

Reads Enabled. Enables Translate/TranslatePlural lookup, default true. false returns the source key or singular/plural at n==1, bypassing catalogs and automatic pseudolocalization. Does not block explicit Pseudolocalize or clear resources.

Returns bool

Stored Enabled value rather than proof of refreshed layout.

IsPseudolocalizationAccentsEnabledbool
# IsPseudolocalizationAccentsEnabled
C#
public bool IsPseudolocalizationAccentsEnabled();

Reads PseudolocalizationAccentsEnabled. Replaces ASCII letters using a built-in accent table, default true. Not a language translation; some replacements contain multiple code points. Runs after vowel doubling and before fake bidi/wrapping. Does not automatically refresh UI.

Returns bool

Stored PseudolocalizationAccentsEnabled value rather than proof of refreshed layout.

IsPseudolocalizationDoubleVowelsEnabledbool
# IsPseudolocalizationDoubleVowelsEnabled
C#
public bool IsPseudolocalizationDoubleVowelsEnabled();

Reads PseudolocalizationDoubleVowelsEnabled. Doubles ASCII a/e/i/o/u in both cases, default false. Does not double all vowels of every language. Runs before accents and can skip recognized placeholders. Does not refresh existing labels.

Returns bool

Stored PseudolocalizationDoubleVowelsEnabled value rather than proof of refreshed layout.

IsPseudolocalizationEnabledbool
# IsPseudolocalizationEnabled
C#
public bool IsPseudolocalizationEnabled();

Reads PseudolocalizationEnabled. Automatically transforms the Translate result, default false. Does not affect TranslatePlural in the current implementation. Explicit Pseudolocalize works regardless of this flag. Changing it does not refresh already assigned UI text.

Returns bool

Stored PseudolocalizationEnabled value rather than proof of refreshed layout.

IsPseudolocalizationFakeBidiEnabledbool
# IsPseudolocalizationFakeBidiEnabled
C#
public bool IsPseudolocalizationFakeBidiEnabled();

Reads PseudolocalizationFakeBidiEnabled. Adds U+202E/U+202C controls around text and individual lines, default false; recognized placeholders are placed outside those spans. A diagnostic transform rather than real RTL translation or automatic UI mirroring. Test real-language shaping and layout separately.

Returns bool

Stored PseudolocalizationFakeBidiEnabled value rather than proof of refreshed layout.

IsPseudolocalizationOverrideEnabledbool
# IsPseudolocalizationOverrideEnabled
C#
public bool IsPseudolocalizationOverrideEnabled();

Reads PseudolocalizationOverrideEnabled. Replaces code points with asterisks, default false, except recognized skipped placeholders. Runs before vowel doubling and accents. Helps find strings bypassing localization; not a secret-data masking facility.

Returns bool

Stored PseudolocalizationOverrideEnabled value rather than proof of refreshed layout.

IsPseudolocalizationSkipPlaceholdersEnabledbool
# IsPseudolocalizationSkipPlaceholdersEnabled
C#
public bool IsPseudolocalizationSkipPlaceholdersEnabled();

Reads PseudolocalizationSkipPlaceholdersEnabled. Preserves two-character %s/%c/%d/%o/%x/%X/%f placeholders during transforms, default true. Does not protect C# {0}, named or extended printf placeholders such as %02d.

Returns bool

Stored PseudolocalizationSkipPlaceholdersEnabled value rather than proof of refreshed layout.

PseudolocalizeStringName
# Pseudolocalize
C#
public StringName Pseudolocalize(StringName message);

Explicitly transforms the supplied string using pseudolocalization settings for this domain. Works even when PseudolocalizationEnabled is false. Does not look up a translation; placeholder skipping does not recognize C# composite format {0}.

Parameters
NameTypeDefault
messageStringName—
message

Text to transform; look up the translation first if needed.

Returns StringName

Transformed text with configured wrappers and padding; empty input remains empty.

RemoveTranslationvoid
# RemoveTranslation
C#
public void RemoveTranslation(Translation translation);

Removes the specific Translation object rather than every catalog of its locale. Repeated removal is a no-op; external resource references remain.

Parameters
NameTypeDefault
translationTranslation—
translation

Non-null Translation object; membership/removal uses object identity.

SetEnabledvoid
# SetEnabled
C#
public void SetEnabled(bool enabled);

Sets Enabled. Enables Translate/TranslatePlural lookup, default true. false returns the source key or singular/plural at n==1, bypassing catalogs and automatic pseudolocalization. Does not block explicit Pseudolocalize or clear resources.

Parameters
NameTypeDefault
enabledbool—
enabled

New Enabled value. Not a command to refresh already assigned UI text.

SetLocaleOverridevoid
# SetLocaleOverride
C#
public void SetLocaleOverride(string locale);

Selects this domain's locale, standardizing a nonempty value. Does not change global project locale or promise to recreate every previously computed UI caption.

Parameters
NameTypeDefault
localestring—
locale

Locale such as ru or en; an empty string clears the override. The addon example supplies GetEditorLanguage on activation.

SetPseudolocalizationAccentsEnabledvoid
# SetPseudolocalizationAccentsEnabled
C#
public void SetPseudolocalizationAccentsEnabled(bool enabled);

Sets PseudolocalizationAccentsEnabled. Replaces ASCII letters using a built-in accent table, default true. Not a language translation; some replacements contain multiple code points. Runs after vowel doubling and before fake bidi/wrapping. Does not automatically refresh UI.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationAccentsEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationDoubleVowelsEnabledvoid
# SetPseudolocalizationDoubleVowelsEnabled
C#
public void SetPseudolocalizationDoubleVowelsEnabled(bool enabled);

Sets PseudolocalizationDoubleVowelsEnabled. Doubles ASCII a/e/i/o/u in both cases, default false. Does not double all vowels of every language. Runs before accents and can skip recognized placeholders. Does not refresh existing labels.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationDoubleVowelsEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationEnabledvoid
# SetPseudolocalizationEnabled
C#
public void SetPseudolocalizationEnabled(bool enabled);

Sets PseudolocalizationEnabled. Automatically transforms the Translate result, default false. Does not affect TranslatePlural in the current implementation. Explicit Pseudolocalize works regardless of this flag. Changing it does not refresh already assigned UI text.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationExpansionRatiovoid
# SetPseudolocalizationExpansionRatio
C#
public void SetPseudolocalizationExpansionRatio(float ratio);

Sets PseudolocalizationExpansionRatio. Additional underscore-padding ratio, default 0. Each side gets the integer part of originalLength*ratio/2, so a short string may not grow. Uses pre-transform input length rather than pixel width. The setter does not clamp; supply a finite nonnegative reasonably bounded value.

Parameters
NameTypeDefault
ratiofloat—
ratio

Finite nonnegative bounded padding ratio such as 0.3; the setter does not clamp it.

SetPseudolocalizationFakeBidiEnabledvoid
# SetPseudolocalizationFakeBidiEnabled
C#
public void SetPseudolocalizationFakeBidiEnabled(bool enabled);

Sets PseudolocalizationFakeBidiEnabled. Adds U+202E/U+202C controls around text and individual lines, default false; recognized placeholders are placed outside those spans. A diagnostic transform rather than real RTL translation or automatic UI mirroring. Test real-language shaping and layout separately.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationFakeBidiEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationOverrideEnabledvoid
# SetPseudolocalizationOverrideEnabled
C#
public void SetPseudolocalizationOverrideEnabled(bool enabled);

Sets PseudolocalizationOverrideEnabled. Replaces code points with asterisks, default false, except recognized skipped placeholders. Runs before vowel doubling and accents. Helps find strings bypassing localization; not a secret-data masking facility.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationOverrideEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationPrefixvoid
# SetPseudolocalizationPrefix
C#
public void SetPseudolocalizationPrefix(string prefix);

Sets PseudolocalizationPrefix. Literal text before transformed nonempty content and left padding, default [. Not looked up in catalogs or extended with a locale name. Empty input receives no wrapping.

Parameters
NameTypeDefault
prefixstring—
prefix

Literal wrapping text; empty is allowed. Not a translation key.

SetPseudolocalizationSkipPlaceholdersEnabledvoid
# SetPseudolocalizationSkipPlaceholdersEnabled
C#
public void SetPseudolocalizationSkipPlaceholdersEnabled(bool enabled);

Sets PseudolocalizationSkipPlaceholdersEnabled. Preserves two-character %s/%c/%d/%o/%x/%X/%f placeholders during transforms, default true. Does not protect C# {0}, named or extended printf placeholders such as %02d.

Parameters
NameTypeDefault
enabledbool—
enabled

New PseudolocalizationSkipPlaceholdersEnabled value. Not a command to refresh already assigned UI text.

SetPseudolocalizationSuffixvoid
# SetPseudolocalizationSuffix
C#
public void SetPseudolocalizationSuffix(string suffix);

Sets PseudolocalizationSuffix. Literal text after transformed nonempty content and right padding, default ]. Not looked up in catalogs. Empty input receives no wrapping.

Parameters
NameTypeDefault
suffixstring—
suffix

Literal wrapping text; empty is allowed. Not a translation key.

TranslateStringName
# Translate
C#
public StringName Translate(StringName message, StringName context = null);

Looks up a message using domain override or project locale, then fallback. This is text lookup, not assignment to Label.Text or validation of rendered pixels.

Parameters
NameTypeDefault
messageStringName—
contextStringNamenull
message

Source message key. Inspect settings becomes Проверить настройки for ru in the example.

context

Optional context distinguishing identical keys with different meanings; empty by default.

Returns StringName

Translated StringName, or source key when no translation exists. Enabled pseudolocalization additionally transforms the result.

TranslatePluralStringName
# TranslatePlural
C#
public StringName TranslatePlural(StringName message, StringName messagePlural, int n, StringName context = null);

Looks up a form in a matching catalog then the server fallback locale, using rules from that Translation. On a miss or Enabled=false returns message only for n==1, otherwise messagePlural. The current implementation applies no pseudolocalization; call Pseudolocalize explicitly when needed. Inserts no count into the text.

Parameters
NameTypeDefault
messageStringName—
messagePluralStringName—
nint—
contextStringNamenull
message

Source lookup key; for Pseudolocalize, already selected text to transform.

messagePlural

Plural source form for fallback at n!=1; not a separate base Translation map key.

n

Nonnegative count for form selection; source fallback uses singular only at 1. The count is not inserted into text.

context

Exact message context; null/default means empty.

Returns StringName

Found form or source singular/plural without automatic pseudolocalization.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.