Projects

Add or edit a key

Create a key by hand, give translators and Glossa the context they need, set a length limit, or delete a key.

A key is the name your code asks for, such as checkout.title. Most keys arrive with your files, through an import, the CLI or an integration, together with their source text. You can also create and edit keys by hand in the editor.

Adding, editing and deleting keys needs the Developer role or above.

Source text comes from your files

The key dialog sets a key's name, description, plural setting and length limit. It does not hold source text: source strings arrive by import, push or integration, and the editor shows them read-only. A key you create by hand has no source text until a file that contains it is imported or pushed. See Keys and strings.

Add a key

Open the dialog

In the editor, select New key. In a project with no strings yet, the editor offers Add one key by hand instead.

Fill in the fields

FieldWhat to enter
Key nameThe name your code uses, for example checkout.title. Up to 500 characters, and unique in the project.
Description (context for translators & AI)What the string is and where it appears, for example "Headline shown on the checkout page". Translators see it in the editor, and Glossa reads it when translating. Up to 2,000 characters.
Plural key (one form per CLDR category)Turn on for a string that changes with a number, such as "1 item" and "3 items". See Plural forms.
Max length (optional)The most characters a translation may have, for text that must fit a button or a label.

Create it

Select Create. A message confirms "Key created."

Edit a key

Open the key

In the editor, switch to Table and select the key's name in the first column. The dialog opens as Edit key name.

Change it

Change any of the fields, then select Save. A message confirms "Key updated."

Things to know when editing:

  • Renaming. If your code or files still use the old name, the next import or push brings it back as a separate key. Rename it in your source files too. To rename many keys that share a prefix, use Keys, then Rename prefix in the editor's bulk actions.
  • Descriptions from files. If your files carry descriptions or comments for their strings, the next push or import of the source language replaces the description with the file's.
  • Plural setting. You can only switch a key between plural and simple while it has no translations.
  • Length limit. Changing Max length (optional) re-checks the key's translations: any that now run over the limit are flagged for review.

Delete a key

Open the key

Open the key as described in Edit a key.

Delete it

Select Delete key. The confirmation reads "The key and every translation of it, in every language, are removed. Anything reading this key from your app falls back to the key name until you push a replacement."

Confirm

Select Delete key. A message confirms "Key deleted."

Deleting a key cannot be undone. To delete many keys at once, select them in the table and use Delete in the bulk bar. A member scoped to particular languages cannot delete a key that has translations in languages outside their access.

If it doesn't work

  • "A key with that name already exists in this project.": choose another name, or edit the existing key.
  • "Cannot change the plural setting of a key that already has translations. Delete them first.": the key already has translations, so its plural setting is fixed.
  • New key is not shown: you need the Developer role or above.

On this page