docs.unity3d.com
    Show / Hide Table of Contents

    Class POFileUtils

    Good info on PO: http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html

    Inheritance
    Object
    POFileUtils
    Namespace: Unity.InteractiveTutorials
    Syntax
    public static class POFileUtils

    Fields

    DateTimeFormat

    Using the format given here https://www.gnu.org/software/trans-coord/manual/gnun/html_node/PO-Header.html

    Declaration
    public const string DateTimeFormat = "yyyy-MM-dd HH:mmK"
    Field Value
    Type Description
    String

    SupportedLanguages

    Currently supported languages, in addition to English.

    Declaration
    public static readonly Dictionary<SystemLanguage, string> SupportedLanguages
    Field Value
    Type Description
    Dictionary<SystemLanguage, String>

    Methods

    CreateHeader(String, String, String)

    Creates a PO file header. https://www.gnu.org/software/trans-coord/manual/gnun/html_node/PO-Header.html https://www.gnu.org/software/gettext/manual/html_node/Header-Entry.html

    Declaration
    public static string CreateHeader(string langCode, string name, string version)
    Parameters
    Type Name Description
    String langCode
    String name
    String version
    Returns
    Type Description
    String

    EscapeString(String)

    http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html, "2.3.3. Escape Sequences"

    Declaration
    public static string EscapeString(string str)
    Parameters
    Type Name Description
    String str
    Returns
    Type Description
    String

    ReadPOFile(String)

    Reads a PO file and creates a list of PO entries.

    Declaration
    public static List<POFileUtils.POEntry> ReadPOFile(string filepath)
    Parameters
    Type Name Description
    String filepath
    Returns
    Type Description
    List<POFileUtils.POEntry>

    WritePOFile(String, String, String, IEnumerable<POFileUtils.POEntry>, String)

    Writes a PO file.

    Declaration
    public static bool WritePOFile(string projectName, string projectVersion, string langCode, IEnumerable<POFileUtils.POEntry> entries, string filepath)
    Parameters
    Type Name Description
    String projectName
    String projectVersion
    String langCode
    IEnumerable<POFileUtils.POEntry> entries
    String filepath
    Returns
    Type Description
    Boolean
    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