Try our conversational search powered by Generative AI!

Class LanguageDocument

Used to load and fetch translations that are stored in xml files.

Inheritance
System.Object
LanguageDocument
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
[Obsolete("Use EPiServer.Framework.Localization.LocalizationService instead", false)]
public class LanguageDocument

Constructors

LanguageDocument()

Initializes a new instance of the LanguageDocument class.

Declaration
public LanguageDocument()

Properties

Root

Gets the root node.

Declaration
public LanguageNode Root { get; }
Property Value
Type Description
LanguageNode

The root node.

Methods

FindNode(String)

Finds the node that matches the given language key.

Declaration
public LanguageNode FindNode(string languageKey)
Parameters
Type Name Description
System.String languageKey

The language key.

Returns
Type Description
LanguageNode

The LanguageNode that matches the given key, or null if no such translation exists.

Load(Stream)

Loads translations from a specified file stream.

Declaration
public void Load(Stream fileStream)
Parameters
Type Name Description
System.IO.Stream fileStream

The file stream.

Load(String)

Loads translations in xml format from a specified file name.

Declaration
public void Load(string fileName)
Parameters
Type Name Description
System.String fileName

Name of the file.

Translate(String, String)

Translates the specified key.

Declaration
public string Translate(string key, string language)
Parameters
Type Name Description
System.String key

The key.

System.String language

The language.

Returns
Type Description
System.String

A translated string if the translation exists; otherwise null.

Extension Methods