Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Waher.Runtime.Language.Language Class Reference

Contains information about a language. More...

Public Member Functions

 Language ()
 Contains information about a language. More...
 
async Task< Namespace > GetNamespaceAsync (string Name)
 Gets the namespace object, given its name, if available. More...
 
async Task< Namespace > GetNamespaceAsync (string Name, bool CreateIfNotFound)
 Gets the namespace object, given its name, if available. More...
 
async Task< Namespace[]> GetNamespacesAsync ()
 Gets available namespaces. More...
 
async Task< Namespace > CreateNamespaceAsync (string Name)
 Creates a new language namespace, or updates an existing language namespace, if one exist with the same properties. More...
 
Task< string > GetStringAsync (Type Type, int Id, string Default)
 Gets the string value of a string ID. If no such string exists, a string is created with the default value. More...
 
async Task< string > GetStringAsync (Type Type, string Id, string Default)
 Gets the string value of a string ID. If no such string exists, a string is created with the default value. More...
 
override string ToString ()
 

Properties

Guid ObjectId [get, set]
 Object ID More...
 
string Code [get, set]
 Language code. More...
 
string Name [get, set]
 Language name. More...
 
byte[] Flag [get, set]
 Language flag. More...
 
int FlagWidth [get, set]
 Width of flag. More...
 
int FlagHeight [get, set]
 Height of flag. More...
 

Detailed Description

Contains information about a language.

Definition at line 16 of file Language.cs.

Constructor & Destructor Documentation

◆ Language()

Waher.Runtime.Language.Language.Language ( )

Contains information about a language.

Definition at line 31 of file Language.cs.

Member Function Documentation

◆ CreateNamespaceAsync()

async Task< Namespace > Waher.Runtime.Language.Language.CreateNamespaceAsync ( string  Name)

Creates a new language namespace, or updates an existing language namespace, if one exist with the same properties.

Parameters
NameNamespace.
Returns
Namespace object.

Definition at line 175 of file Language.cs.

◆ GetNamespaceAsync() [1/2]

async Task< Namespace > Waher.Runtime.Language.Language.GetNamespaceAsync ( string  Name)

Gets the namespace object, given its name, if available.

Parameters
NameNamespace.
Returns
Namespace object, if found, or null if not found.

Definition at line 99 of file Language.cs.

◆ GetNamespaceAsync() [2/2]

async Task< Namespace > Waher.Runtime.Language.Language.GetNamespaceAsync ( string  Name,
bool  CreateIfNotFound 
)

Gets the namespace object, given its name, if available.

Parameters
NameNamespace.
CreateIfNotFoundIf a new Namespace object should be created, if one is not found.
Returns
Namespace object, if found or created, or null if not found.

Definition at line 130 of file Language.cs.

◆ GetNamespacesAsync()

async Task< Namespace[]> Waher.Runtime.Language.Language.GetNamespacesAsync ( )

Gets available namespaces.

Returns
Namespaces.

Definition at line 143 of file Language.cs.

◆ GetStringAsync() [1/2]

Task< string > Waher.Runtime.Language.Language.GetStringAsync ( Type  Type,
int  Id,
string  Default 
)

Gets the string value of a string ID. If no such string exists, a string is created with the default value.

Parameters
TypeType, whose namespace defines in what language namespace the string will be fetched.
IdString ID
DefaultDefault (untranslated) string.
Returns
Localized string.

Definition at line 209 of file Language.cs.

◆ GetStringAsync() [2/2]

async Task< string > Waher.Runtime.Language.Language.GetStringAsync ( Type  Type,
string  Id,
string  Default 
)

Gets the string value of a string ID. If no such string exists, a string is created with the default value.

Parameters
TypeType, whose namespace defines in what language namespace the string will be fetched.
IdString ID
DefaultDefault (untranslated) string.
Returns
Localized string.

Definition at line 221 of file Language.cs.

◆ ToString()

override string Waher.Runtime.Language.Language.ToString ( )

Definition at line 230 of file Language.cs.

Property Documentation

◆ Code

string Waher.Runtime.Language.Language.Code
getset

Language code.

Definition at line 48 of file Language.cs.

◆ Flag

byte [] Waher.Runtime.Language.Language.Flag
getset

Language flag.

Definition at line 68 of file Language.cs.

◆ FlagHeight

int Waher.Runtime.Language.Language.FlagHeight
getset

Height of flag.

Definition at line 88 of file Language.cs.

◆ FlagWidth

int Waher.Runtime.Language.Language.FlagWidth
getset

Width of flag.

Definition at line 78 of file Language.cs.

◆ Name

string Waher.Runtime.Language.Language.Name
getset

Language name.

Definition at line 58 of file Language.cs.

◆ ObjectId

Guid Waher.Runtime.Language.Language.ObjectId
getset

Object ID

Definition at line 39 of file Language.cs.


The documentation for this class was generated from the following file: