Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ResourceImporterCSVTranslation

继承: ResourceImporter < RefCounted < Object

导入 CSV

描述

逗号分隔值是纯文本表格存储格式。该格式的简单性使其可以轻松地在任何文本编辑器或电子表格软件中进行编辑。这使其成为游戏本地化的常见选择。

示例 CSV 文件:

keys,en,es,ja
GREET,"Hello, friend!","Hola, amigo!",こんにちは
ASK,How are you?,Cómo está?,元気ですか
BYE,Goodbye,Adiós,さようなら
QUOTE,"""Hello"" said the man.","""Hola"" dijo el hombre.",「こんにちは」男は言いました

教程

属性

bool

compress

true

int

delimiter

0


属性说明

bool compress = true

如果为 true,则会创建 OptimizedTranslation 而不是 Translation。这样得到的文件会更小,但代价是 CPU 会消耗得稍多一些。


int delimiter = 0

在 CSV 文件中使用的分隔符。该默认值符合常见的 CSV 约定。制表符分隔值有时被称为 TSV 文件。