Table of Contents

Class Po

Namespace
Yarhl.Media.Text
Assembly
Yarhl.Media.Text.dll

Portable Object format for translations.

public class Po : ICloneableFormat, IFormat
Inheritance
Po
Implements
Inherited Members
Extension Methods

Constructors

Po()

Initializes a new instance of the Po class.

public Po()

Po(PoHeader)

Initializes a new instance of the Po class.

public Po(PoHeader headerArg)

Parameters

headerArg PoHeader

PO header.

Properties

Entries

Gets the entries.

public ReadOnlyCollection<PoEntry> Entries { get; }

Property Value

ReadOnlyCollection<PoEntry>

The entries.

Header

Gets or sets the header.

public PoHeader Header { get; set; }

Property Value

PoHeader

The header.

Methods

Add(IEnumerable<PoEntry>)

Add the specified entries.

public void Add(IEnumerable<PoEntry> items)

Parameters

items IEnumerable<PoEntry>

Entries to add.

Add(PoEntry)

Add the specified entry.

public void Add(PoEntry item)

Parameters

item PoEntry

Entry to add. The ID must be unique.

DeepClone()

Deep clones a format into a new object.

public virtual object DeepClone()

Returns

object

The cloned format.

Remarks

A 'deep copy' must create the necessary copies, in the way that any change in the original node (or any of it's member hierarchy) won't affect the cloned node.

FindEntry(string, string?)

Gets a PoEntry from the original text.

public PoEntry? FindEntry(string original, string? context = null)

Parameters

original string

Original text from the entry.

context string

Context text from the entry.

Returns

PoEntry

The found entry or null if not found.