I thought (and hoped) that the translations were written in the folder
wp-content/languages/loco/plugins/my-plugin.
They are, but only when you create the file in that location.
Any users wishing to customize your provided translations should create a new translations file and not edit yours. Opening your provided PO file and starting to edit will not automatically create a custom copy in another location. (it doesn’t know whether the person editing is you – the author, or someone else).
If you provide a valid and correctly named POT file, all they have to do is click Add language and select the custom location to create their own version. If you don’t provide a POT file, they may wish to follow this guide which explains how to take your provided PO file as a base for their custom translations.
On translate (when I use __(“translatedKey”, “my-plugin”)) the
translated value is first read from
wp-content/languages/loco/plugins/my-plugin and if missing here
fallback to plugins/my-plugin/languages.
This is what happens once the user has two files for the same language.
After creating their own file they will have one in the custom folder (theirs) and one under the plugin folder (yours). Loco Translate’s loading helper ensures that their custom translations are used first and falls back on your file for any missing ones.