Skip to content

Editor Tools

Menu: Tools → KitStack → Lexis → Setup

The Setup Panel provides an overview of your Lexis configuration and integration status.

Features:

  • Integration status for optional packages (TMP, UI Toolkit, UniTask, Addressables, ZString)
  • Async backend availability check
  • Quick actions for common tasks
  • First-time setup guidance

UI Elements:

  • Status Indicators: Green (Active), Yellow (Recompiling), Gray (Not Installed)
  • Open Package Manager: Quick access to install optional packages
  • Create Settings Asset: Creates LocalizationSettings if missing
  • Open String Table Browser: Jump to the main editor
  • Show on Unity Start: Toggle auto-display on Editor launch

Menu: Tools → KitStack → Lexis → String Table Browser

The main editor window for managing translations.

Tabs:

TabPurpose
TranslationsEdit string entries inline
LanguagesConfigure supported locales
ValidationRun validation checks
OverviewStatistics and setup summary

Translations Tab Features:

  1. Table Selector: Dropdown to switch between String Tables and Asset Tables
  2. All Tables View: Select "All Tables" from the Table dropdown to view unified entries from all tables
  3. Search Bar: Filter entries by key or content (works across all tables in "All Tables" mode)
  4. Entry List: Virtualized rendering for thousands of entries
  5. Inline Editing: Edit translations directly in the table (when viewing a specific table)
  6. Add/Remove Entries: Buttons for entry management
  7. Column Resize: Drag column borders to adjust widths
  8. Comments: Expandable notes for translators
  9. Table Column: In "All Tables" mode, each entry shows which table it belongs to
  10. Target Table Selection: When adding entries in "All Tables" mode, select the target table from a dropdown
  11. Sync Menu: Dropdown menu for Pull/Push translations with Google Sheets (see Google Sheets Provider section)

Step-by-Step: Adding a Translation

  1. Open Tools → KitStack → Lexis → String Table Browser
  2. Select your String Table from the Table dropdown (or "All Tables" to view all entries)
  3. Click the Translations tab
  4. Click + Add Entry at the bottom
  5. When a specific table is selected:
    • The Table field shows the target table (read-only)
  6. When "All Tables" is selected:
    • Use the Target Table dropdown to select where the entry will be added
  7. Enter the Key (e.g., ui.button.start)
  8. Enter translations for each language column
  9. (Optional) Add a Comment for translator context
  10. Changes save automatically

Step-by-Step: Importing CSV

  1. Open Tools → KitStack → Lexis → Import → CSV File...
  2. Click Browse and select your CSV file
  3. Choose import mode:
    • Single Locale: One CSV per language
    • Language Per Column: All languages in one file
  4. Configure delimiter and header options
  5. Select target: Create New Table or Update Existing
  6. Click Import

Menu: Tools → KitStack → Lexis → Language Switcher

Quick language testing tool for development.

Features:

  • Dropdown to select active locale
  • Previous/Next buttons for cycling languages
  • Initialization status display
  • Auto-update toggle for Editor play mode

Usage:

  1. Open Tools → KitStack → Lexis → Language Switcher
  2. Select a language from the dropdown
  3. All localized components in the scene update immediately
  4. Use Previous/Next buttons to cycle through languages

Menu: Tools → KitStack → Lexis → Pseudo-Localization Preview

Pseudo-localization is a testing technique that transforms your strings to simulate translated text without actual translations. It helps identify common localization issues before your content is translated.

Why Use Pseudo-Localization?

IssueHow Pseudo-Localization Helps
Text truncationBracket encapsulation ([text]) reveals when UI clips text
Text expansionSimulates 30-40% length increase typical of German/Finnish
Character encodingAccented characters (à, è, ñ) reveal encoding problems
Hardcoded stringsUntransformed text stands out as missing localization
Placeholder handlingVerifies {0} and Smart Strings work correctly

Transformations

Character Substitution: Replaces ASCII letters with visually similar accented equivalents:

  • aà, eè, oò
  • AÀ, EÈ, OÒ
  • Result: "Hello" → "Ĥèĺĺò"

Text Expansion: Adds padding to simulate longer translations:

  • Factor 1.3 = 30% longer (typical for German)
  • Factor 1.5 = 50% longer (worst-case scenarios)
  • Result: "Hello" → "Hello~~~"

Bracket Encapsulation: Wraps text to detect truncation:

  • Prefix: [, Suffix: ]
  • Result: "Hello" → "[Hello]"

Combined Output:

"Hello World" → "[Ĥèĺĺò Ŵòŕĺð~~~]"

Settings Configuration

Create Settings Asset:

  1. Right-click in Project window
  2. Navigate to Create → KitStack → Lexis → Pseudo-Localization Settings
  3. Place in Assets/Resources/ for automatic loading

Settings Options:

SettingDefaultDescription
EnableAccentstrueReplace ASCII with accented characters
EnableExpansiontrueExpand text length
ExpansionFactor1.3Length multiplier (1.0-2.0)
EnableBracketstrueWrap text in brackets
BracketPrefix[Opening bracket character(s)
BracketSuffix]Closing bracket character(s)
ExpansionMethodPaddingPadding or WordBased expansion
PaddingCharacter~Character for padding expansion
ExclusionPatternsURLs, EmailsRegex patterns to exclude from transformation
ExcludedKeys(empty)Specific keys to skip

Preview Window

Menu: Tools → KitStack → Lexis → Pseudo-Localization Preview

The preview window allows testing transformations interactively:

  1. Enter text in the Input Text field
  2. Adjust settings using the checkboxes and sliders
  3. View transformed output in real-time
  4. Click Copy to Clipboard to use the result

Example Texts: Quick-access buttons for common test cases (placeholders, URLs, plurals).

String Table Browser Integration

The String Table Browser includes a "Pseudo" toggle in the toolbar:

  1. Open Tools → KitStack → Lexis → String Table Browser
  2. Click the Pseudo button in the toolbar (turns green when active)
  3. All displayed translations now show pseudo-localized versions
  4. Toggle off to return to normal view

This helps visualize how your entire table looks under pseudo-localization without modifying any data.

Runtime API

csharp
using Lexis.PseudoLocalization;

// Transform a single string
string result = PseudoLocalizer.Transform("Hello World");
// Result: "[Ĥèĺĺò Ŵòŕĺð~~~]"

// Transform with custom settings
var settings = PseudoLocalizationSettings.Instance;
settings.ExpansionFactor = 1.5f;
string expanded = PseudoLocalizer.Transform("Button", settings);

// Individual transformations
string accented = PseudoLocalizer.ApplyAccents("Hello");           // "Ĥèĺĺò"
string expanded = PseudoLocalizer.ApplyExpansion("Hello", 1.4f);   // "Hello~~"
string bracketed = PseudoLocalizer.ApplyBrackets("Hello");         // "[Hello]"

// Check if text is pseudo-localized
bool isPseudo = PseudoLocalizer.IsPseudoLocalized(result, settings);

Placeholder Preservation

Pseudo-localization automatically preserves:

  • Positional placeholders: {0}, {1}
  • Named placeholders: {playerName}, {count}
  • Format specifiers: {0:N0}, {0:C}
  • Smart Strings: {count:plural:one=# item|other=# items}
  • URLs: https://example.com
  • Email addresses: user@example.com

Example:

Input:  "Welcome, {playerName}! Visit https://example.com"
Output: "[Ŵèĺçòmè, {playerName}! Vïšïť https://example.com~~~]"

Integration with LocalizationService

Enable pseudo-localization in your LocalizationSettings for runtime preview:

  1. Select your LocalizationSettings asset
  2. In the Inspector, find Pseudo-Localization (Pro) section
  3. Check Enable Pseudo Localization
  4. Optionally assign a custom settings asset

When enabled (in Editor and Development builds only), Localization.Get() returns pseudo-localized strings:

csharp
// With pseudo-localization enabled in settings
string text = Localization.Get("greeting"); // Returns pseudo-localized version

Note

Pseudo-localization is automatically disabled in Release builds for production safety.

Best Practices

  1. Test Early: Enable pseudo-localization during UI development, not after
  2. Check Expansion: German and Finnish can be 30-40% longer than English
  3. Verify Truncation: Missing brackets indicate clipped text
  4. Review Formatting: Ensure placeholders and Smart Strings render correctly
  5. Screenshot Tests: Compare UI screenshots with pseudo-localization enabled

Menu: Tools → KitStack → Lexis → Import → ...

ImporterMenu PathFormats
CSVImport → CSV File....csv
JSONImport → JSON File....json
POImport → PO File (Gettext)....po, .pot

Context Menu (Right-click on StringTable):

  • Assets → KitStack → Lexis → Import CSV to String Table
  • Assets → KitStack → Lexis → Import JSON to String Table
  • Assets → KitStack → Lexis → Import PO to String Table

Professional Unity Development Tools