<!--
title: Consistent placeholder conventions
domain: app-frameworks
topic: Naming Conventions
language: Json
source: appwrite/appwrite
updated: 2025-07-21
url: https://awesomereviewers.com/reviewers/appwrite-consistent-placeholder-conventions/
-->

{% raw %}
Ensure all placeholders in localization files follow consistent naming conventions to prevent runtime errors and text leakage in the UI. This applies to both sprintf-style placeholders (`%s`) and template variables (`{{name}}`).

Common issues to watch for:
1. **Correct sprintf order**: Use `%s` not `s%`
   ```diff
   -"emails.invitation.subject": "Invitació a l'equip %s a s%",
   +"emails.invitation.subject": "Invitació a l'equip %s a %s",
   ```


Placeholder errors are particularly problematic because they can:
- Break runtime string substitution
- Cause literal placeholder text to appear in the UI
- Lead to crashes in formatting functions
- Create inconsistent user experiences across languages
{% endraw %}
