1 # Language Naming Conventions
3 This page contains general rules for naming language items and for their values.
4 API-specific rules are listed on the relevant API page:
6 - [Comments](../php/api/comments.md#language-items)
13 If you have an application `foo` and a database object `foo\data\bar\Bar` with a property `baz` that can be set via a form field, the name of the corresponding language item has to be `foo.bar.baz`.
14 If you want to add an additional description below the field, use the language item `foo.bar.baz.description`.
18 If an error of type `{error type}` for the previously mentioned form field occurs during validation, you have to use the language item `foo.bar.baz.error.{error type}` for the language item describing the error.
20 Exception to this rule:
21 There are several general error messages like `wcf.global.form.error.empty` that have to be used for general errors like an empty field that may not be empty to avoid duplication of the same error message text over and over again in different language items.
23 #### Naming Conventions
25 - If the entered text does not conform to some special rules, i.e. if the text is invalid, use `invalid` as error type.
26 - If the entered text is required to be unique but is already used for another object, use `notUnique` as error type.
29 ## Confirmation messages
31 If the language item for an action is `foo.bar.action`, the language item for the confirmation message has to be `foo.bar.action.confirmMessage` instead of `foo.bar.action.sure` which is still used by some older language items.
33 ### Type-Specific Deletion Confirmation Message
38 {if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} {element type} wirklich löschen?
44 {if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} das Icon wirklich löschen?
50 Do you really want delete the {element type}?
56 Do you really want delete the icon?
59 ### Object-Specific Deletion Confirmation Message
64 {if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} {element type} <span class="confirmationObject">{object name}</span> wirklich löschen?
70 {if LANGUAGE_USE_INFORMAL_VARIANT}Willst du{else}Wollen Sie{/if} den Artikel <span class="confirmationObject">{$article->getTitle()}</span> wirklich löschen?
76 Do you really want to delete the {element type} <span class="confirmationObject">{object name}</span>?
82 Do you really want to delete the article <span class="confirmationObject">{$article->getTitle()}</span>?
92 | group type | action | example permission name | language item |
93 | ---------- | ------ | ----------------------- | ------------- |
94 | user | adding | `user.foo.canAddComment` | `Kann Kommentare erstellen` |
95 | user | deleting | `user.foo.canDeleteComment` | `Kann eigene Kommentare löschen` |
96 | user | editing | `user.foo.canEditComment` | `Kann eigene Kommentare bearbeiten` |
97 | moderator | deleting | `mod.foo.canDeleteComment` | `Kann Kommentare löschen` |
98 | moderator | editing | `mod.foo.canEditComment` | `Kann Kommentare bearbeiten` |
99 | moderator | moderating | `mod.foo.canModerateComment` | `Kann Kommentare moderieren` |
103 | group type | action | example permission name | language item |
104 | ---------- | ------ | ----------------------- | ------------- |
105 | user | adding | `user.foo.canAddComment` | `Can create comments` |
106 | user | deleting | `user.foo.canDeleteComment` | `Can delete their comments` |
107 | user | editing | `user.foo.canEditComment` | `Can edit their comments` |
108 | moderator | deleting | `mod.foo.canDeleteComment` | `Can delete comments` |
109 | moderator | editing | `mod.foo.canEditComment` | `Can edit comments` |
110 | moderator | moderating | `mod.foo.canModerateComment` | `Can moderate comments` |