Importing Translated Data
Import translated text from a specified file into game data.
Command
# local game data (windows)
dotnet charon DATA I18N IMPORT --dataBase "c:\my app\gamedata.json" --input "c:\my app\character_loc.xliff" --inputFormat xliff
# remote game data
dotnet charon DATA I18N IMPORT --dataBase "https://charon.live/view/data/My_Game/develop/" --input "./character_loc.xliff" --inputFormat xliff --credentials "<API-Key>"
Parameters
- --dataBase
Absolute or relative path to game data. Use quotation marks if your path contains spaces.
# local file --dataBase "c:\my app\gamedata.json" # remote server --dataBase "https://charon.live/view/data/My_Game/develop/"
- --credentials
The API key used to access remote server in case of –dataBase being URL.
- --schemas
A list of types of documents (schemas) to import. By default all schemas EXCEPT metadata are imported.
Use space to separate multiple schemas.
You can use wildcards (*) at the beginning and end of names.
You can use identifiers in {} instead of names.
You can exclude certain names by using an exclamation mark (!) at the beginning of their names.
# schema name --schemas Character --schemas Character Item # all (default) --schemas * # masks --schemas Char* --schemas *Modifier --schemas *Mod* # schema id --schemas {18d4bf318f3c49688087dbed} # negation --schemas Char* !Character --schemas !*Item* # excluding system schemas (Schema, SchemaProperty, ProjectSettings) --schemas ![system]
- --languages
The list of languages to import. Values are language tags (BCP 47).
# Import specific language --languages en-US es-ES # Import all languages --languages *
- --input
Path to a file with data to import. Alternatively, you can use Standart Input or URL.
See input data structure requirements.
# standart input (default) --input in --input con # absolute path (windows) --input "c:\my app\input.json" # absolute path (unix) --input /user/data/input.json # relative path (universal) --input "./input.json" # remote location (HTTP) --input "http://example.com/input.json" # remote location with authentication (FTP) --input "ftp://user:password@example.com/input.json"
- --inputFormat
Format of imported data.
# Auto-detect by extension (default) --inputFormat auto # XLIFF v2 --inputFormat xliff --inputFormat xliff2 # XLIFF v1 --inputFormat xliff1 # XSLX Spreadsheet --inputFormat xslx
- --inputFormattingOptions
Additional options for specified format.
- --output
Optional path to a import report file. If the file exists, it will be overwritten. The directory must already exist. Alternatively, you can output to Standard Error, Standard Output, /dev/null, or a URL.
# standart output --output out --output con # standart error --output err # null device (default) --output null # absolute path (windows) --output "c:\my app\document.json" # absolute path (unix) --output /user/data/document.json # relative path (universal) --output "./document.json" # remote location (HTTP) --output "http://example.com/document.json" # remote location with authentication (FTP) --output "ftp://user:password@example.com/document.json"
- --outputFormat
Format of import report.
# JSON (default) --outputFormat json # BSON --outputFormat bson # Message Pack --outputFormat msgpack # XLSX Spreadsheet --outputFormat xlsx
- --outputFormattingOptions
Additional options for specified format.
- --dryRun
Allows you to run the command without actually making any changes to the game data, providing a preview of what would happen.
This command supports universal parameters.