Namespaces
Especially when managing more extensive projects, storing all keys in a single localization file can be insufficient. That's where namespaces come into play. This feature enables you to structure keys into different namespaces. When Tolgee exports a project with namespaces, Tolgee stores the namespace data to separate files.
In the Translations view, namespaces are displayed on the top of each namespace group.
Selecting namespaces for a new key
To select namespace while creating a new key
- Click
+ Add
in the top right of the Translations view - Select the namespace in the
namespace
dropdown- If the desired namespace doesn't exist yet, fill in the namespace name in the dialog and click the
+
icon on the right to create it.
- If the desired namespace doesn't exist yet, fill in the namespace name in the dialog and click the
Filtering by namespace
There are two ways how to filter keys by namespaces.
Using filter dropdown
- Click the
Filter...
dropdown in the Translations view - Click
Namespaces
- Select one or multiple namespaces
Using the namespace banner
- Click the namespace banner on top of namespace key group
- Select
Filter by namespace
Renaming namespaces
- Click the filter banner on top of namespace key group
- Select
Rename namespace
- Set a new name in the dialog
- Click rename
- Confirm the operation
Deleting namespace
Tolgee deletes namespaces automatically when there is no key assigned to them.
To delete a namespace, just delete all keys in the namespace.
Exporting keys by namespaces
When exporting keys, you can select which namespaces should be exported. If you don't select any namespace, all keys will be exported.