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:
| Tab | Purpose |
|---|---|
| Translations | Edit string entries inline |
| Languages | Configure supported locales |
| Validation | Run validation checks |
| Overview | Statistics and setup summary |
Translations Tab Features:
- Table Selector: Dropdown to switch between String Tables and Asset Tables
- All Tables View: Select "All Tables" from the Table dropdown to view unified entries from all tables
- Search Bar: Filter entries by key or content (works across all tables in "All Tables" mode)
- Entry List: Virtualized rendering for thousands of entries
- Inline Editing: Edit translations directly in the table (when viewing a specific table)
- Add/Remove Entries: Buttons for entry management
- Column Resize: Drag column borders to adjust widths
- Comments: Expandable notes for translators
- Table Column: In "All Tables" mode, each entry shows which table it belongs to
- Target Table Selection: When adding entries in "All Tables" mode, select the target table from a dropdown
- Sync Menu: Dropdown menu for Pull/Push translations with Google Sheets (see Google Sheets Provider section)
Step-by-Step: Adding a Translation
- Open Tools → KitStack → Lexis → String Table Browser
- Select your String Table from the Table dropdown (or "All Tables" to view all entries)
- Click the Translations tab
- Click + Add Entry at the bottom
- When a specific table is selected:
- The Table field shows the target table (read-only)
- When "All Tables" is selected:
- Use the Target Table dropdown to select where the entry will be added
- Enter the Key (e.g.,
ui.button.start) - Enter translations for each language column
- (Optional) Add a Comment for translator context
- Changes save automatically
Step-by-Step: Importing CSV
- Open Tools → KitStack → Lexis → Import → CSV File...
- Click Browse and select your CSV file
- Choose import mode:
- Single Locale: One CSV per language
- Language Per Column: All languages in one file
- Configure delimiter and header options
- Select target: Create New Table or Update Existing
- 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:
- Open Tools → KitStack → Lexis → Language Switcher
- Select a language from the dropdown
- All localized components in the scene update immediately
- 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?
| Issue | How Pseudo-Localization Helps |
|---|---|
| Text truncation | Bracket encapsulation ([text]) reveals when UI clips text |
| Text expansion | Simulates 30-40% length increase typical of German/Finnish |
| Character encoding | Accented characters (à, è, ñ) reveal encoding problems |
| Hardcoded strings | Untransformed text stands out as missing localization |
| Placeholder handling | Verifies {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:
- Right-click in Project window
- Navigate to Create → KitStack → Lexis → Pseudo-Localization Settings
- Place in
Assets/Resources/for automatic loading
Settings Options:
| Setting | Default | Description |
|---|---|---|
EnableAccents | true | Replace ASCII with accented characters |
EnableExpansion | true | Expand text length |
ExpansionFactor | 1.3 | Length multiplier (1.0-2.0) |
EnableBrackets | true | Wrap text in brackets |
BracketPrefix | [ | Opening bracket character(s) |
BracketSuffix | ] | Closing bracket character(s) |
ExpansionMethod | Padding | Padding or WordBased expansion |
PaddingCharacter | ~ | Character for padding expansion |
ExclusionPatterns | URLs, Emails | Regex 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:
- Enter text in the Input Text field
- Adjust settings using the checkboxes and sliders
- View transformed output in real-time
- 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:
- Open Tools → KitStack → Lexis → String Table Browser
- Click the Pseudo button in the toolbar (turns green when active)
- All displayed translations now show pseudo-localized versions
- Toggle off to return to normal view
This helps visualize how your entire table looks under pseudo-localization without modifying any data.
Runtime API
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:
- Select your
LocalizationSettingsasset - In the Inspector, find Pseudo-Localization (Pro) section
- Check Enable Pseudo Localization
- Optionally assign a custom settings asset
When enabled (in Editor and Development builds only), Localization.Get() returns pseudo-localized strings:
// With pseudo-localization enabled in settings
string text = Localization.Get("greeting"); // Returns pseudo-localized versionNote
Pseudo-localization is automatically disabled in Release builds for production safety.
Best Practices
- Test Early: Enable pseudo-localization during UI development, not after
- Check Expansion: German and Finnish can be 30-40% longer than English
- Verify Truncation: Missing brackets indicate clipped text
- Review Formatting: Ensure placeholders and Smart Strings render correctly
- Screenshot Tests: Compare UI screenshots with pseudo-localization enabled
Menu: Tools → KitStack → Lexis → Import → ...
| Importer | Menu Path | Formats |
|---|---|---|
| CSV | Import → CSV File... | .csv |
| JSON | Import → JSON File... | .json |
| PO | Import → 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
