SPLanguageSettings.TryDetermineLanguage 方法 (String[], String[], LanguageDecisionOptions, String)
尝试确定要使用的最佳区域性。此重载允许自定义选项
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function TryDetermineLanguage ( _
supportedLanguages As String(), _
desiredLanguages As String(), _
options As LanguageDecisionOptions, _
<OutAttribute> ByRef language As String _
) As Boolean
用法
Dim supportedLanguages As String()
Dim desiredLanguages As String()
Dim options As LanguageDecisionOptions
Dim language As String
Dim returnValue As Boolean
returnValue = SPLanguageSettings.TryDetermineLanguage(supportedLanguages, _
desiredLanguages, options, language)
public static bool TryDetermineLanguage(
string[] supportedLanguages,
string[] desiredLanguages,
LanguageDecisionOptions options,
out string language
)
参数
supportedLanguages
类型:[]支持的区域性代码的列表
desiredLanguages
类型:[]首选的区域性代码的列表
options
类型:Microsoft.SharePoint.LanguageDecisionOptions要传递给自定义行为的回退算法的标志
language
类型:System.String要保存所选的语言
返回值
类型:System.Boolean
如果一种语言是选成功,则返回 false ; 否则为