MultilanguageStringExtensionsGetCurrentLanguageStringOrDefault Method |
Gets the current language string. When from is null or there is no string for the current language,
returns the language string of the default language.
Namespace:
Aloe.EnterpriseOne.Model
Assembly:
Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntaxpublic static string GetCurrentLanguageStringOrDefault(
this MultilanguageString from,
string defaultLanguage = "en"
)
<ExtensionAttribute>
Public Shared Function GetCurrentLanguageStringOrDefault (
from As MultilanguageString,
Optional defaultLanguage As String = "en"
) As String
public:
[ExtensionAttribute]
static String^ GetCurrentLanguageStringOrDefault(
MultilanguageString^ from,
String^ defaultLanguage = L"en"
)
[<ExtensionAttribute>]
static member GetCurrentLanguageStringOrDefault :
from : MultilanguageString *
?defaultLanguage : string
(* Defaults:
let _defaultLanguage = defaultArg defaultLanguage "en"
*)
-> string
Parameters
- from
- Type: Aloe.EnterpriseOne.ModelMultilanguageString
The MultilanguageString from which to get the current string. - defaultLanguage (Optional)
- Type: SystemString
The default language. This is EN (English) by default.
Return Value
Type:
String
The current language string.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
MultilanguageString. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also