How to keep translation keys in order

The order of translation keys in your localization files may not seem important at first glance, but it can affect your localization process, depending on your workflow. For example, if you are using a translation management system (TMS) like SimpleLocalize, the order of translation keys can impact how translators work with the files and how they are displayed in the TMS interface. In this blog post, we'll explore how to keep translation keys in order, why it matters, and how to sort them effectively. We will also describe the use case of working with translation keys in a random order and how to handle it.
Why to keep translation keys in order?
Keeping translation keys in order can help maintain consistency and organization in your localization files. It can also make it easier for translators to find and work with specific keys, especially in larger projects, when users are already accustomed to a specific order. Additionally, having a consistent order can help prevent errors and confusion when merging or updating localization files.
In a TMS like SimpleLocalize, the order of translation keys can affect how they are displayed in the translation editor. By default, translation keys are displayed in alphabetical order, but you can also choose to display them in the order they appear in the source file. This can be helpful for translators who are familiar with the original file and want to work with the keys in the same order.
How to keep translation keys in import order?
SimpleLocalize allows you to keep the order of translation keys when importing localization files. This means that if you have a specific order in your source file, it will be preserved in the translation editor to make it easier for translators to work with the keys.
When importing translations, you can choose the Import order sorting option in the translation editor. This will ensure that the translation keys are displayed in the same order as they appear in the source file.
When you change the order of translation keys in your source file, you can also choose to update the order of translation keys in the translation editor. To do this, you can use the Update order option during import.

Use
UPDATE_ORDER
option for import via API or CLI.
During export, you can also choose the import order of translation keys in the exported file. This can be helpful if you want to keep the order of translation keys consistent across different files or if you want to ensure that the exported file matches the original source file.

Use
--downloadSort IMPORT_ORDER
option for export via CLI. For API export, usesort
parameter withIMPORT_ORDER
value.
Sorting translation keys
Translation editor in SimpleLocalize allows you to sort translation keys in different ways. You can sort them alphabetically, which is the default sorting option, or you can sort them by most or least translated keys, newest or oldest keys, last seen, last modified, by namespacer or by the order they appear in the source file.

Thanks to this flexibility, you can choose the sorting option that works best for you. This setting can be adjusted by each user to their preference.
When translation keys order doesn't matter
In many localization projects, the order of translation keys doesn't actually matter. Translation files use a key-value format (like JSON or YAML), where the app just looks up the key to find the right text. It doesn't care where the key appears in the file.
If you're using a translation management system, this becomes even more true. Translators usually don't work directly with the source files—they use a clean interface that helps them search, filter, and organize translations however they want. So the original order of keys doesn't affect their work.
Here are some cases where the order of keys doesn't really matter:
- When translators use a TMS instead of editing the file directly.
- In automated workflows, where tools handle the translations without needing any specific order.
- When the TMS sorts keys automatically, like alphabetically or by usage.
In our localization workflow guide, you can see that many modern workflows rely on automation and tools that make key order unimportant. What matters more is using clear, consistent key names and organizing your files in a way that works for your team.
In short, keeping keys in a specific order is more of a human preference—it can help with readability, but it won't affect how your app runs or how translations are done.
Conclusion
Keeping translation keys in order can be important for maintaining consistency and organization in your localization files. SimpleLocalize provides options to keep the order of translation keys during import and export, as well as sorting options in the translation editor. By using these features, you can ensure that your translation keys are displayed in a way that works best for your team and translators.
If you have any questions or need help with keeping translation keys in order, feel free to reach out to us at [email protected].