Skip to main content

crowdin string add

Description

Add a new source string

Synopsis

crowdin string add <text> [CONFIG OPTIONS] [OPTIONS]

Arguments

<text>
Set text for the new source string

Options

--identifier=
Set an identifier for the new source string

--max-length=
Set a max. length of the translated text for the new source string

--context=
Add a context for the new source string

--file=
Specify a file the new source string should be added to (multiple files could be specified)

--label=
Attach labels to strings (multiple labels can be specified)

-b, --branch=
Specify branch name. Default: none

--hidden
Choose whether or not the added strings should be hidden in your Crowdin project

--one=
Plural form one (singular)

--two=
Plural form two (dual)

--few=
Plural form few (paucal)

--many=
Plural form many

--zero=
Plural form zero

-V, --version
Display version information and exit

-h, --help
Display help message and exit

--no-progress
Disable progress on executed command

-v, --verbose
Provide more information about the command execution

--no-colors
Disable colors and styles

-c, --config=
Specify a path to the configuration file. Default: crowdin.yml or crowdin.yaml

--identity=
Specify a path to user-specific credentials

Config Options

-T, --token=
Personal access token required for authentication

--base-url=
Base URL of Crowdin server for API requests execution

--base-path=
Path to your project directory on a local machine

-i, --project-id=
Numeric ID of the project

Examples

Add a new string with the app.home key to the src/values/strings.xml file:

crowdin string add Home --file src/values/strings.xml --identifier "app.home"

Add a new string with the app.download key to the src/values/strings.xml file (branch main):

crowdin string add Download --file main/src/values/strings.xml --identifier "app.download"

Add a new string with the app.hello key to the strings.xml file, with labels app and home:

crowdin string add "Hello world" --file strings.xml --identifier "app.hello" --label app --label home

Add a new plural string:

crowdin string add Cats --file strings.xml --identifier "ui.cats" --one "cat"

In this example, the <text> argument is used as the "other" plural form.

If your source language contains more plural forms, you can also specify them using the `--two', `--few', `--many' and `--zero' options.