docs.unity3d.com
    Show / Hide Table of Contents

    Interface IXliffDocument

    The root element of an XLIFF document is <xliff>. It contains a collection of <file> elements. Typically, each <file> element contains a set of <unit> elements that contain the text to be translated in the <source> child of one or more <segment> elements. Translations are stored in the <target> child of each <segment> element.

    Namespace: UnityEditor.Localization.Plugins.XLIFF.Common
    Syntax
    public interface IXliffDocument

    Properties

    FileCount

    The number of files in the document.

    Declaration
    int FileCount { get; }
    Property Value
    Type Description
    Int32

    SourceLanguage

    The language that was translated from to TargetLanguage

    Declaration
    string SourceLanguage { get; set; }
    Property Value
    Type Description
    String

    TargetLanguage

    The language that was translated to from SourceLanguage.

    Declaration
    string TargetLanguage { get; set; }
    Property Value
    Type Description
    String

    Version

    The XLIFF version.

    Declaration
    string Version { get; }
    Property Value
    Type Description
    String

    Methods

    AddFile(IFile)

    Adds a new file to the document.

    Declaration
    void AddFile(IFile f)
    Parameters
    Type Name Description
    IFile f

    AddNewFile()

    Add a new files to the document and returns it.

    Declaration
    IFile AddNewFile()
    Returns
    Type Description
    IFile

    The new file.

    GetFile(Int32)

    Returns the file for the requested index.

    Declaration
    IFile GetFile(int index)
    Parameters
    Type Name Description
    Int32 index

    The file index.

    Returns
    Type Description
    IFile

    The requested file of null if one does not exist.

    RemoveFile(IFile)

    Remove the files from the document.

    Declaration
    void RemoveFile(IFile f)
    Parameters
    Type Name Description
    IFile f

    Serialize(Stream)

    Serialize the document into XLIFF.

    Declaration
    void Serialize(Stream stream)
    Parameters
    Type Name Description
    Stream stream
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023