I’m developing a plugin for which I generated a .pot file for i18n. It appears that 90% of po and mo files correspond to admin translation. For this reason splitting language files in admin and frontend part could speed up frontend page loading.
I only found one quite old link about this subject: https://github.com/woocommerce/woocommerce/issues/2051. However, it seems that Woocommerce (I never used it) do not longer implement the solution given in that post.
Splitting pot file is quite tricky:
– we must generate 2 pot files from different files and folders (need some custom makepotfile.php)
– but some strings are used in both admin and frontend part (how to remove duplicate string from one pot file)
– we must load one or both files while running the plugin (this seems easy)
Here are my questions:
– is there any recommendations for splitting pot file in WordPress plugin?
– is there an open source plugin implementing such a feature (I could base my work on this one)?
Regards to the WordPress community.
- The topic ‘Splitting plugin language files for frontend and admin’ is closed to new replies.