Here are the recommended steps for developers to follow to achive the best performance and results from XLocalizer. However, depending on your setup and project you may follow different steps according to your requirements.
The reasone why: during development many texts are subject to change, so you don't need to translate and add unnessary keys to the resource files.
When you are sure that all the texts or most of them are fixed, enable AutoTranslate, AutoAddKeys and keep UseExpressMemoryCache disabled till all translation are done, saved and validated.
Run the app and switch to all available cultures till you are sure that all pages are visited. So XLocalizer can add all keys and translations to the resource files/db.
(recommended) After all translations are done correctly, you can enable UseExpressMemoryCache in XLocalizer options; this will cache localized keys in memory for faster access.
(highly recommended) Always review the auto translated texts, specifically the ones with html content or placeholders e.g. The field {0} is required.. It could happen that some translation engines may discard formatting placeholders and return a text without {0} or with wrong html codes, and this may cause unexpected results or errors if not fixed manually.
(optional) Disable AutoTranslate and AutoAddKeys in XLocalizer options after you are sure all texts are localized.
(optional) if you want to use RESX as resource files for localization in production, you can use the built-in export module to export the localized keys to .resx files.
The default DbContext lifetime is Scoped, and XLocalizer.DB requires a Transient lifetime for the DbContext. So, it is better to keep localization DbContext separate than the application DbContext. In other words, use one db for XLocalizer services and another one for your application.