Skip to content

editor_toolset.toolsets.string_table.StringTableTools

Provides tools for creating and editing StringTable assets.

8 tool(s).

editor_toolset.toolsets.string_table.StringTableTools.create

Creates a new StringTable asset.

    Args:
        folder_path: The path to the folder that will contain the asset.
        asset_name: The name of the asset.

    Returns:
        The created StringTable.

Input schema

{
  "properties": {
    "asset_name": {
      "type": "string"
    },
    "folder_path": {
      "type": "string"
    }
  },
  "required": [
    "folder_path",
    "asset_name"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.get_entry

Returns the source string for a specific key.

    Args:
        string_table: The StringTable asset to query.
        key: The key whose string value to retrieve.

    Returns:
        The source string for the key.

Input schema

{
  "properties": {
    "key": {
      "type": "string"
    },
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "string_table",
    "key"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "string"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.get_namespace

Returns the namespace of a StringTable asset.

    Args:
        string_table: The StringTable asset to query.

    Returns:
        The namespace string.

Input schema

{
  "properties": {
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "string_table"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "string"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.get_table_id

Returns the table ID for a StringTable asset.

    The table ID is derived from the asset's package path and is used
    to reference the string table in text properties and localisation.

    Args:
        string_table: The StringTable asset to query.

    Returns:
        The table ID as a string.

Input schema

{
  "properties": {
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "string_table"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "type": "string"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.import_file

Imports a file from disk as a StringTable asset.

    The file must have a header row with at least 'Key' and 'SourceString'
    columns. Additional meta-data columns are imported but the namespace
    is not - the StringTable's namespace is derived from its asset path.

    Args:
        folder_path: The content-browser folder to create the asset in.
        asset_name: The name of the new asset.
        source_file: The absolute path to the source file on disk.

    Returns:
        The assets produced by the import (a single StringTable).

Input schema

{
  "properties": {
    "asset_name": {
      "type": "string"
    },
    "folder_path": {
      "type": "string"
    },
    "source_file": {
      "type": "string"
    }
  },
  "required": [
    "folder_path",
    "asset_name",
    "source_file"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "properties": {
          "refPath": {
            "description": "The reference stored as a soft path string.",
            "type": "string"
          }
        },
        "required": [
          "refPath"
        ],
        "title": "/Script/CoreUObject.Object",
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.list_keys

Lists all keys in the string table.

    Args:
        string_table: The StringTable asset to query.

    Returns:
        A list of key strings.

Input schema

{
  "properties": {
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "string_table"
  ],
  "type": "object"
}

Output schema

{
  "properties": {
    "returnValue": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "returnValue"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.remove_entry

Removes an entry from the string table.

    Args:
        string_table: The StringTable asset to modify.
        key: The key of the entry to remove.

Input schema

{
  "properties": {
    "key": {
      "type": "string"
    },
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    }
  },
  "required": [
    "string_table",
    "key"
  ],
  "type": "object"
}

editor_toolset.toolsets.string_table.StringTableTools.set_entry

Adds or updates an entry in the string table.

    If the key already exists its value is replaced; otherwise a new entry
    is created.

    Args:
        string_table: The StringTable asset to modify.
        key: The key for the entry.
        value: The source string value for the entry.

Input schema

{
  "properties": {
    "key": {
      "type": "string"
    },
    "string_table": {
      "description": "Represents a reference to a UObject or UClass.",
      "properties": {
        "refPath": {
          "description": "The reference stored as a soft path string.",
          "type": "string"
        }
      },
      "required": [
        "refPath"
      ],
      "title": "/Script/Engine.StringTable",
      "type": "object"
    },
    "value": {
      "type": "string"
    }
  },
  "required": [
    "string_table",
    "key",
    "value"
  ],
  "type": "object"
}