Share via


SPLanguageSettings.TryDetermineLanguage method (String[], String[], LanguageDecisionOptions, String)

Try to determine the best culture to use. This overload allows custom options

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function TryDetermineLanguage ( _
    supportedLanguages As String(), _
    desiredLanguages As String(), _
    options As LanguageDecisionOptions, _
    <OutAttribute> ByRef language As String _
) As Boolean
'Usage
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
)

Parameters

  • supportedLanguages
    Type: []

    List of supported culture codes

  • desiredLanguages
    Type: []

    List of preferred culture codes

  • language
    Type: System.String

    Where the selected language will be stored

Return value

Type: System.Boolean
True if a language was successfully selected, false otherwise

See also

Reference

SPLanguageSettings class

SPLanguageSettings members

TryDetermineLanguage overload

Microsoft.SharePoint namespace