Skip to content

Commit

Permalink
Initial Support for UICulture
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelinux committed Jan 30, 2024
1 parent d2bd6a9 commit 9690226
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions AsBuiltReport.Veeam.VBR.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## Import localisation strings based on UICulture
$importLocalizedDataParams = @{
BindingVariable = 'localized'
BaseDirectory = ($PSScriptRoot + '\Language')
FileName = 'AsBuiltReport.Veeam.VBR.Resources.psd1'
}
Import-LocalizedData @importLocalizedDataParams -ErrorAction SilentlyContinue

#Fallback to en-US culture strings
if (-not (Test-Path -Path 'Variable:\localized'))
{
$importLocalizedDataParams['UICulture'] = 'en-US'
Import-LocalizedData @importLocalizedDataParams -ErrorAction Stop
}

# Get public and private function definition files and dot source them
$Public = @(Get-ChildItem -Path $PSScriptRoot\Src\Public\*.ps1 -ErrorAction SilentlyContinue)
$Private = @(Get-ChildItem -Path $PSScriptRoot\Src\Private\*.ps1 -ErrorAction SilentlyContinue)
Expand Down
7 changes: 7 additions & 0 deletions Language/en-US/AsBuiltReport.Veeam.VBR.Resources.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# en-US
ConvertFrom-StringData @'
LicenseSectionHeader = License Information
LicenseSectionHeaderParagraph = The following section provides a summary about the installed licenses
InstalledLicenseSectionHeader = Installed License Information
InstalledLicenseSectionTableParams = Licenses - {0}
'@;
5 changes: 5 additions & 0 deletions Language/es-ES/AsBuiltReport.Veeam.VBR.Resources.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# es-ES
ConvertFrom-StringData @'
LicenseSectionHeader = Informacion de Licencias
LicenseSectionHeaderParagraph = La siguiente sección proporciona un resumen sobre las licencias instaladas.
'@;

0 comments on commit 9690226

Please sign in to comment.