Configuring Language
This guide walks you through enabling languages, translating text, and applying multi-language support in your SCADA project.
Configuration Locationโ
Navigate to Basic Management > Language in the development environment.
๐ท [Screenshot: Language management interface]
Step 1: Enable Languagesโ
Enable the languages you want to support in your project.
View Available Languagesโ
- Open the Language management interface
- View the list of available languages
- Each language shows:
- Language name
- Language code (e.g., en-US, zh-CN)
- Enable/disable toggle
๐ท [Screenshot: Language list with enable toggles]
Enable a Languageโ
- Locate the language you want to enable
- Click the toggle switch to enable
- The language is now available for translation
Commonly Used Languages:
- English (United States) - en-US
- Chinese (Simplified) - zh-CN
- Spanish - es
- German - de
- French - fr
- Japanese - ja
- Korean - ko
๐ก Tip: Enable only the languages you will actively use to keep the translation list manageable.
Disable a Languageโ
- Click the toggle switch to disable
- Translations are preserved but not available in runtime
- Re-enable anytime to restore translations
โ ๏ธ Caution: Disabling a language does not delete translations. They are preserved for future use.
Step 2: Translate Textโ
Translate user-defined text (configurable text) for each enabled language.
Understanding the Translation Listโ
The translation list automatically includes:
- All text from components in views
- Custom text added manually
- Text is organized by original (source) text
Translation List Columns:
| Column | Description |
|---|---|
| Original Text | Source text (usually in default language) |
| Language 1 | Translation for first enabled language |
| Language 2 | Translation for second enabled language |
| ... | Additional enabled languages |
| Actions | Translate, edit, delete |
๐ท [Screenshot: Translation list showing original text and translations]
Auto-Detect Text from Viewsโ
Text is automatically detected when you:
- Add components with text to views
- Modify text in existing components
- Save views
To manually refresh the list:
- Click Sync or Refresh button
- System scans all views for text
- New text is added to translation list
Translate Text Manuallyโ
Single Text Translationโ
- Locate the original text in the list
- Click in the translation column for target language
- Enter the translated text
- Press Enter or click outside to save
๐ท [Screenshot: Manual text entry in translation column]
Batch Quick Translationโ
- Select multiple text entries (checkboxes)
- Click Quick Translate button
- Enter translations in the dialog:
- Original text is shown for reference
- Enter translation for each selected text
- Click Confirm to save all translations
๐ท [Screenshot: Quick translate dialog with multiple entries]
๐ก Tip: Use Quick Translate for translating related text entries together (e.g., all button labels).
Translate Text Automaticallyโ
Use built-in auto-translation for quick translations.
Configure Translation Engineโ
- Click the dropdown arrow (โจ) next to Auto Translate button
- Select translation engine:
- Google Translate
- Microsoft Translator
- Baidu Translate
- Custom API
- Configure API credentials if required
๐ท [Screenshot: Translation engine configuration]
Auto-Translate Single Textโ
- Locate the text to translate
- Click the Translate button (icon) for that text
- System automatically translates to target language
- Review and edit if needed
Auto-Translate Multiple Textsโ
- Select multiple text entries (checkboxes)
- Click Auto Translate button
- System translates all selected texts
- Review translations and make corrections
๐ก Tip: Auto-translation is convenient but may not be accurate for technical terms. Always review auto-translated text.
โ ๏ธ Caution: Auto-translation requires internet connection and may have usage limits depending on the translation service.
Add Custom Text Manuallyโ
Add text that is not automatically detected:
- Click Add Text button
- Enter original text
- Enter translations for enabled languages
- Click Confirm
Use Cases:
- Text used in scripts
- Dynamic text generated at runtime
- Text for future use
Step 3: Export and Import Translationsโ
Export translations for professional translation services or backup.
Export Translationsโ
- Click Export button
- Select export location
- System exports to Excel file (.xlsx)
Excel File Structure:
| Column A | Column B | Column C | Column D |
|---|---|---|---|
| Original Text | Language 1 | Language 2 | Language 3 |
| Button1 | Button1 | ๆ้ฎ1 | Botรณn1 |
| Start | Start | ๅฏๅจ | Iniciar |
| Stop | Stop | ๅๆญข | Detener |
๐ท [Screenshot: Exported Excel file showing translation columns]
Export Uses:
- Send to professional translators
- Backup translations
- Share translations across projects
- Review translations offline
Import Translationsโ
Import translations from Excel file:
- Select the target language in the language list
- Click Import button
- Select Excel file to import
- System imports translations for selected language
Import Process:
Step 1: Select target language
๐ท [Screenshot: Language selection before import]
Step 2: Choose Excel file
๐ท [Screenshot: File selection dialog]
Step 3: Review imported translations
๐ท [Screenshot: Translation list after import]
Import Rules:
- Original text is matched to existing entries
- Translation is imported to selected language column
- New original text creates new entries
- Existing translations are overwritten
๐ก Tip: Use the same Excel file structure as exported to ensure successful import.
Example Import Workflow:
- Export translations to Excel
- Send Excel to translator
- Translator fills in translation column
- Import completed Excel file
- Review and test translations
Step 4: Preview Translationsโ
Preview translations in the development environment before deploying to runtime.
Enable Preview Modeโ
- Open a view in the View Editor
- Click Language button in the toolbar
- Select language to preview
- View updates to show translations
๐ท [Screenshot: Language selector in View Editor toolbar]
Adjust Layout for Translationsโ
When previewing, you may need to adjust layouts:
Text Overflow:
- Increase component width
- Reduce font size
- Use line breaks in text
- Abbreviate if necessary
Layout Adjustments:
- Resize components to fit translated text
- Reposition components if needed
- Adjust alignment and spacing
- Test with longest translations
๐ก Tip: Design layouts with 30-50% extra space to accommodate text expansion in translations.
Test All Languagesโ
- Switch between languages in preview mode
- Check each view for:
- Text overflow or truncation
- Layout issues
- Alignment problems
- Font size readability
- Make adjustments as needed
- Save changes
Step 5: Apply Multi-Language in Runtimeโ
Enable language switching for operators in the runtime environment.
Method 1: Language Switcher Componentโ
Add a pre-built language switcher component to your views.
- Open a view in the View Editor
- Navigate to Components > Standard > Language Switcher
- Drag component to the canvas
- Position and resize as needed
Component Features:
- Dropdown list of enabled languages
- Automatic language switching
- Saves user preference
- Updates all views instantly
๐ท [Screenshot: Language switcher component in view]
Configuration:
- No configuration required
- Automatically shows all enabled languages
- Can be styled like other components
Method 2: Custom Language Switchingโ
Create custom language switching using event-actions.
Example: Language Selection Buttons
- Add buttons for each language (e.g., "English", "ไธญๆ", "Espaรฑol")
- For each button, add event-action:
- Event: Click
- Action: System > Switch Language
- Language: Select target language
๐ท [Screenshot: Event-action configuration for language switching]
Example: Dropdown Language Selector
- Add dropdown component
- Configure options: List of languages
- Add event-action:
- Event: Input Change
- Action: System > Switch Language
- Language:
event.target.value
Example: Automatic Language Selection
- Add event-action to view load:
- Event: View Load
- Condition: Check user preference or system locale
- Action: System > Switch Language
- Language: Based on condition
Default Language Settingโ
Configure the default language for new sessions:
- Navigate to Project Settings
- Find Language section
- Set Default Language:
- Follow System: Use operating system language
- Specific Language: Always use selected language
- Save settings
๐ท [Screenshot: Default language setting in project settings]
Behavior:
- Follow System: Automatically selects language based on OS locale
- Specific Language: Always starts with selected language
- User can override with language switcher
Advanced Scenariosโ
Scenario 1: Role-Based Languageโ
Use Case: Automatically set language based on user role or location.
Implementation:
- Store user language preference in database
- On login, query user's preferred language
- Use event-action to switch language:
- Event: System Startup or View Load
- Action: Query to Tags (get user language)
- Action: System > Switch Language
Scenario 2: Language-Specific Viewsโ
Use Case: Show different views for different languages.
Implementation:
- Create separate views for each language
- Use event-action to navigate based on language:
- Event: System Startup
- Condition: Check current language
- Action: Navigate to language-specific view
Scenario 3: Partial Translationโ
Use Case: Translate only critical text, leave technical terms in English.
Implementation:
- Identify text that should not be translated
- Use same text for all languages in translation list
- Or use language-specific formatting (e.g., "Temperature (ๆธฉๅบฆ)")
Scenario 4: Dynamic Text Translationโ
Use Case: Translate text generated dynamically in scripts.
Implementation:
- Create translation entries for all possible dynamic text
- In script, use translation lookup:
var translatedText = GetTranslation("Original Text"); - Display translated text in components
Best Practicesโ
Translation Qualityโ
Professional Translation:
- Use professional translators for critical text
- Provide context for technical terms
- Review translations with native speakers
- Test translations in actual use cases
Consistency:
- Create and maintain a translation glossary
- Use consistent terminology across all views
- Standardize common phrases and labels
- Review translations periodically for consistency
Accuracy:
- Verify technical terms are translated correctly
- Ensure safety-critical text is accurate
- Test translations with end users
- Correct errors promptly
Workflow Efficiencyโ
Batch Operations:
- Translate related text together
- Use Quick Translate for similar entries
- Export/import for large translation projects
- Leverage auto-translation for initial drafts
Version Control:
- Export translations regularly for backup
- Track translation changes over time
- Maintain translation history
- Document translation decisions
Collaboration:
- Assign translation responsibilities
- Use export/import for external translators
- Review translations as a team
- Establish approval process
Maintenanceโ
Regular Updates:
- Update translations when source text changes
- Review translations after view modifications
- Check for missing translations periodically
- Keep translation list synchronized with views
Quality Checks:
- Test all languages before deployment
- Verify text fits in layouts
- Check for truncation or overflow
- Ensure readability at runtime
Documentation:
- Document translation standards
- Maintain glossary of technical terms
- Record translation decisions
- Provide guidelines for future translations
Troubleshootingโ
Text Not Translatingโ
Problem: Text remains in original language after switching.
Possible Causes:
- Text not in translation list
- Translation not entered for target language
- Component not supporting translation
Solutions:
- Click Sync to refresh translation list
- Check if translation exists for target language
- Verify component type supports translation
- Check if text is in image (not translatable)
Translation Not Savingโ
Problem: Entered translations disappear after closing.
Possible Causes:
- Not clicking Save or Confirm
- Database write error
- Insufficient permissions
Solutions:
- Always click Save after entering translations
- Check database connection
- Verify user has write permissions
- Review system logs for errors
Layout Issues After Translationโ
Problem: Text overflows or layout breaks in translated language.
Possible Causes:
- Translated text is longer than original
- Component size too small
- Fixed layout not accommodating text expansion
Solutions:
- Increase component width
- Reduce font size
- Use line breaks in translation
- Redesign layout with flexible sizing
- Abbreviate text if necessary
Import Not Workingโ
Problem: Import fails or imports incorrect data.
Possible Causes:
- Excel file format incorrect
- Original text doesn't match
- Wrong language selected for import
Solutions:
- Use exported Excel as template
- Ensure original text column matches exactly
- Select correct target language before import
- Check Excel file for formatting issues
- Verify file is not corrupted
Auto-Translation Failsโ
Problem: Auto-translate button does nothing or shows error.
Possible Causes:
- No internet connection
- Translation API not configured
- API quota exceeded
- Service unavailable
Solutions:
- Check internet connectivity
- Configure translation engine settings
- Verify API credentials
- Check API usage limits
- Try different translation engine
- Use manual translation as fallback
Next Stepsโ
Now that you know how to configure multi-language support, explore:
- Creating Views: Design views with translatable text
- Creating Event-Actions: Automate language switching
- Understanding Project: Manage project-wide language settings
Related Topicsโ
- Understanding Language: Learn about the Language system architecture
- Working with Projects: Configure default language settings
- Views Reference: Component translation support reference