作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个使用SharePoint api的函数,因此公开了方法SPUtility.GetLocalizedString。
我还确定了uint语言编号1033(英语)和1036(法语)作为参数之一。
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
$en = 1033
$fr = 1036
$str = "$Resources:docliblist"
$resx = "core"
$locstr = [Microsoft.SharePoint.Utilities.SPUtility]::GetLocalizedString($str, $resx, $en)
$locstr
$locstr = [Microsoft.SharePoint.Utilities.SPUtility]::GetLocalizedString ("$Resources:doclibList", "core", $fr)
$locstr
$str = "$Resources:core, docliblist"
$locstr = [Microsoft.SharePoint.Utilities.SPUtility]::GetLocalizedString($str, $null, $en)
最佳答案
如果$Resources
不是powershell变量,则需要转义'$'
。尝试这种方式:
$str = "`$Resources:docliblist"
关于sharepoint - Powershell:使用SharePoint API,GetLocalizedString不返回任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9809128/
我是一名优秀的程序员,十分优秀!