Server.Languages Property
SQL Server 2012
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
'Declaration <SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, _ GetType(Language))> _ Public ReadOnly Property Languages As LanguageCollection Get 'Usage Dim instance As Server Dim value As LanguageCollection value = instance.Languages
Property Value
Type: Microsoft.SqlServer.Management.Smo.LanguageCollectionA LanguageCollection object that represents all the languages supported by the instance of SQL Server.
The Languages property points to the LanguageCollection object. You can use the collection to reference the various written languages that are supported by SQL Server.
Visual Basic
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Display the supported languages.
Dim lng As Language
For Each lng In srv.Languages
Console.WriteLine(lng.Name)
Next
PowerShell
$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
foreach ($lng in $srv.Languages)
{
Write-Host $lng.Name
}
