BlogBest PracticesInsights

Key Naming Conventions, File Maintenance, & Best Practices

Master key naming conventions and file structure to help ensure a seamless localization process

Conventions for Seamless Localization

Is your design team thinking about localization early in the design process and looking to stay aligned with development? Or are you already running into issues with disorganized string files and inconsistent key naming?

No matter which localization workflow your team follows, a streamlined process starts with clear and consistent key naming conventions and organized string files. These conventions not only keep your team in sync, they also make your product easier to manage, scale, and launch across multiple markets without causing headaches.

By following the best practices outlined below, your team can maintain clarity and consistency, while avoiding common pitfalls like messy string files, duplicate entries, and naming inconsistencies.

Key Naming Conventions

  • Consistency: Use uniform naming conventions like CamelCase or snake_case throughout your project.
  • Descriptive Names: Avoid vague or non-descriptive names like btn1, label2, or option. Ensure key names are meaningful and clearly convey their purpose (e.g., welcoming_message, choose_locale).
  • Namespace Utilization: Employ namespaces or prefixes to distinguish similar keys in different contexts (e.g., order.save, profile.save).
  • Limited Nesting: Avoid deep nesting; restrict levels to 2-3 to keep keys simple and clear.
  • Grouping: Organize frequently used keys (e.g., buttons, navigation) into global namespaces for ease of reuse and consistency. Avoid crowding the global namespace with unrelated keys.
  • Concatenating Keys: Avoid combining multiple keys to generate new strings.

String File Structure

  • File Scope: Divide translation files by scope, such as blog, forum, or static_pages, to ensure they stay easy to manage.
  • Duplication Reduction: Consolidate duplicate keys when they represent the same meaning or functionality. However, don’t use a single key like confirm or save for varying contexts.
  • Regular Audits: Periodically review translation files to identify and remove outdated or unnecessary keys.
  • Refactoring: Simplify your localization structure by updating and reorganizing key names as needed.
  • Relevance Maintenance: Ensure key names stay consistent with the app or software’s current state, even as translations evolve.
  • Complex Folder Structures: Avoid overly complicated folder structures; prioritize simplicity and scalability.


By implementing key naming conventions while maintaining a clean and scalable string file structure, your team can avoid common challenges to ensure a more efficient localization workflow. Whether you're just starting to localize or refining an existing process, these best practices will help your product stay consistent, manageable, and ready for global growth.

Related Articles