Translation keys are used to manage the various translations for text elements in your workspace/event app.
Below you will find some recommendations for creating translation keys in your workspaces.
Following these guidelines will help ensure that your translations appear properly in the event app, and avoid errors.
Use clear and descriptive keys
Keys should describe the text they represent. This makes it easier to understand and find them later:
- Good:
user_profile.edit_button
- Bad:
button1
Stick to "snake" case
Always use lowercase letters, separating words with underscores "_":
- Good:
welcome_message
- Bad:
WelcomeMessage
Separate words with dots for structure
Use dots "." to group keys logically. For example, group the keys for buttons under a feature like user_profile:
- Good:
user_profile.edit_button
- Bad:
editbutton
Do not use forbidden characters
Only use letters, underscores "_", and dots ".". Do not use numbers, spaces, and special characters (for example "@" or "#"):
- Good:
user_profile.edit_button
- Bad:
my_key.1
Keep keys neutral
Keys should not include words in any specific language. They should be language-independent:
- Good:
error_message
- Bad:
mensaje_error
Comments
0 comments
Please sign in to leave a comment.