🥳
PowerShell Universal
Ironman SoftwareForums
v3
v3
  • About
  • What's New in v3?
  • Get Started
  • Additional Resources
  • Installation
    • Docker
    • Upgrading
    • Uninstall
  • Licensing
  • System Requirements
  • Supported Browsers
  • Cmdlet Help
  • Modules
  • API
    • About
    • Endpoints
    • Security
    • Error Handling
    • Rate Limiting
  • Automation
    • About Automation
    • Scripts
      • Parameters
    • Jobs
    • Schedules
    • System Events
    • Terminals
    • Triggers
    • Queues
  • User Interfaces
    • About
    • Dashboards
      • Dashboards
      • Examples
      • Components
        • Pages
        • Dynamic Regions
        • Element
        • Error Boundary
        • HTML
        • Custom Components
          • Building Custom JavaScript Components
        • Data Display
          • Alert
          • Badge
          • Chip
          • Data Grid
          • Date and Time
          • Icon
          • List
          • Markdown
          • Table
          • Timeline
          • Tooltip
          • Tree View
          • Typography
        • Data Visualization
          • Charts
          • Image
          • Map
        • Feedback
          • Backdrop
          • Modal
          • Progress
          • Skeleton
        • Inputs
          • Autocomplete
          • Button
          • Checkbox
          • Code Editor
          • Date Picker
          • Editor
          • Floating Action Button
          • Form
          • Radio
          • Rating
          • Select
          • Slider
          • Switch
          • Textbox
          • Time Picker
          • Transfer List
          • Upload
        • Navigation
          • Drawer
          • Link
          • Menu
          • Stepper
          • Tabs
        • Layout
          • Grid Layout
          • Grid
          • Hidden
          • Stack
        • Utilities
          • Protect Section
          • Transitions
        • Surfaces
          • AppBar
          • Card
          • Paper
          • Expansion Panel
      • Interaction
      • Marketplace
      • Role Based Access
      • Scheduled Endpoints
      • Sessions
      • Themes
        • Cascading Style Sheets
        • Styles
      • Custom Variable Scopes
      • Migrating From Universal Dashboard 2.9
    • Pages
      • Alerts
      • Bar Chart
      • Button
      • Card
      • Form
      • iFrame
      • Image
      • Line Chart
      • Liquid Chart
      • Paragraph
      • Statistic
      • Table
      • Variables
  • Desktop
    • About Desktop Mode
    • File Associations
    • Hotkeys
    • Pages
    • Protocol Handlers
  • Platform
    • Cache
    • Modules
    • Monitoring
    • Notifications
    • Published Folders
    • Templates
    • Translations
    • User Sessions
    • Variables
  • Configuration
    • About
    • API
    • Command Line Options
    • Environments
    • Feature Flags
    • Git
    • Hosting
      • Azure
      • High Availability
      • IIS
    • Login Page
    • Management API
    • Persistence
    • App Settings
    • Security
      • Best Practices
      • Access Controls
      • App Tokens
      • Client Certificate
      • OpenID Connect
      • PowerShell Protect
      • SAML2
      • WS-Federation
    • Repository
    • Running as a Service Account
    • Best Practices
  • Development
    • Debugging Scripts
    • Editor
    • Hangfire
    • Logging
    • Profiling
    • Visual Studio Code Extension
  • Changelog
  • Extension Changelog
  • Legacy Universal Dashboard Docs
Powered by GitBook

Copyright 2025 Ironman Software

On this page
Edit on GitHub
Export as PDF

Last updated 2 years ago

Translations require a .

Translation support provides the ability to use a special provider to return strings based on the language of the user accessing the API or dashboard.

Defining Strings

Navigate to Platform \ Translations in the Admin Console to define language strings.

Once you have created the language, you can begin to add strings to it by click Edit. The Key will be used within your scripts and will return the value. The value will change depending on the language.

Using Strings

To use a string, you will take advantage of the new $tl: provider. Using this provider in your scripts will automatically translate the key to the string for the user's language.

For example, you would use the variable like this.

The returned value, when the user's locale is en, will be USA.

Strings are currently available in APIs and dashboards automatically and in scripts when setting the LanguageID variable.

Note that the $t: provider is also available but due to conflicts with the FileSystem provider and mapped T: drives, we suggest using the $tl: provider instead. The $t: provider will be mapped on machines that do not already have a T: drive mapped.

Selecting a Language

PowerShell Universal selects the user's language by examining the Accept-Language header in the HTTP request when user's visit the dashboard page or make an API call. If you want to set a language when running a script, you will need to set the $LanguageID variable to the language you wish to return.

Fallback Logic

If a language is not defined for the specific language ID (e.g. en-US), then PowerShell Universal will attempt to locate the next best language. For example, this would then look for en.

If no language can be found, then the server-wide fallback language will be used. If this hasn't been defined, en will be used. You can specify this the fallback language in Settings \ General \ Platform.

If no language can be found for the specified key, the key will be returned.

Language Files

Language files are generated in the translations folder within the repository. Each language will have a .ps1 file named after the language ID. New-PSUTranslation is used to define the language and set the strings.

It may be desired to edit language files in this way to accommodate copy and pasting keys between language files.

To define a new language, click Create New Language Translation. The language ID should be the that the browser will present when a user accesses the API or dashboard (e.g. en-US)

$tl:String1
  1. Platform

Translations

Translate strings between languages.

PreviousTemplatesNextUser Sessions
  • Defining Strings
  • Using Strings
  • Selecting a Language
  • Fallback Logic
  • Language Files
language ID
license