Is there any solution to translate just specific strings from plugins/theme from one central file? So the only translated strings are there (frontend) so editor of the website doesn't need to search trough all .MO files in Loco translate for example?
Is there any solution to translate just specific strings from plugins/theme from one central file? So the only translated strings are there (frontend) so editor of the website doesn't need to search trough all .MO files in Loco translate for example?
Share Improve this question edited Apr 15, 2020 at 21:39 Tom J Nowell♦ 61.1k7 gold badges79 silver badges148 bronze badges asked Apr 15, 2020 at 21:19 KarnakKarnak 1171 silver badge5 bronze badges1 Answer
Reset to default 2No, this isn't possible, that's not how mo
or po
files work.
A po
file declares which locale it is for, and gets compiled into an mo
file. You can't store more than 1 locale in the same file. Each file represents a single locale.
Keep in mind that these files aren't a WordPress thing. They're a gettext
thing, and are used in lots of different applications, including other CMS's and even programs that have nothing to do with websites and servers.
So there is no WordPress based solution to your problem. Your search should continue elsewhere, specifically in the area of tooling