You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pode currently has support for localisation on server-side strings - primarily errors and some informational text displayed on the terminal.
This will include the other side to this, which is to allow localised values - strings, dates, times, numbers - but for the client-side.
The plan is to leverage the AutoImport feature, which will automatically import any locale files found in a /locales folder found at the root of your server - similar to /views. The path can be customised, or the auto-importing disabled. And there will also be an Import-PodeLocaleData to do this manually, as well as an Add-PodeLocale to fully do it programmatically via a hashtable.
The structure of the folder will be the same as what Import-LocalizedData expects - where sub-directories are the names of the locales/cultures, and they then each contain .psd1 files.
Pode currently has support for localisation on server-side strings - primarily errors and some informational text displayed on the terminal.
This will include the other side to this, which is to allow localised values - strings, dates, times, numbers - but for the client-side.
The plan is to leverage the AutoImport feature, which will automatically import any locale files found in a
/locales
folder found at the root of your server - similar to/views
. The path can be customised, or the auto-importing disabled. And there will also be anImport-PodeLocaleData
to do this manually, as well as anAdd-PodeLocale
to fully do it programmatically via a hashtable.The structure of the folder will be the same as what
Import-LocalizedData
expects - where sub-directories are the names of the locales/cultures, and they then each contain.psd1
files.During a web request, Pode will automatically calculate which culture the request should use via:
pode.culture
X-PODE-CULTURE
$WebEvent.Session.Data.Culture
)$WebEvent.Auth.User.Culture
)Accept-Language
header$PSUICulture
en
There will also be new scoped variables to help:
$locale:
$datetime:
$date:
$time:
$number:
The latter ones for datetimes and numbers will help localise variables containing datetimes/numbers.
The text was updated successfully, but these errors were encountered: