在Powershell实施期间,我想从语言特定资源dll获取资源值,资源文件在" en-US"," de-DE",...中可用。 。文件夹
答案 0 :(得分:0)
以下是de-De资源阅读的示例powershell脚本
$de_DE_ResourceAssembly = [Reflection.Assembly]::LoadFile("<full Path to resources.dll e.g ...\bin\de-DE\snapin.resources.dll >")
$manifestName = $de_DE_ResourceAssembly.GetManifestResourceNames()
$rm = new-object -typename System.Resources.ResourceManager -ArgumentList
$manifestName.Replace('.resources',''), $de_DE_ResourceAssembly
$culture = New-Object System.Globalization.CultureInfo("de-DE")
$rm.GetString("<Resource key>",$culture)