hi,
did you mean do some changes in EM translation files and then make it upgrade proof?
Thread Starter
bubdev
(@bubdev)
Hi Angelo,
yes that’s exactly what I was trying to achieve.
bub
Thread Starter
bubdev
(@bubdev)
May I ask you again, if EM does allow for a solution?
Thanks
bub
The only solution I can think of is use a different way of translating…
Thread Starter
bubdev
(@bubdev)
Hi,
I hope it’s okay to continue my old thread. I recently came across something that would be a user friendly solution for what I consider a (little but important) shortcoming in this otherwise great plugin.
As a refresher, I was asking for a way to customize the language file in an upgrade safe way. Most of the bigger plugins I use allow me to safe my customized .po and .mo files to wp-content/languages/plugins [or: /plugin-name] or in a specifically named folder inside my theme’s directory.
So couldn’t you therefore just allow for an alternate path to a customized language file where the plugin’s textdomain is beeing loaded? Something like:
function load_plugin_textdomain() {
$domain = $this->plugin_slug;
$mo_file = WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . get_locale() . '.mo';
load_textdomain( $domain, $mo_file );
load_plugin_textdomain( $domain, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
}
I copied the snippet from this post. http://fooplugins.com/make-a-wordpress-plugin-translations/
I think that’s how other plugins I use are handling it. Maybe I miss something and you guys have a good reason not to. I just wanted to adress this again, because it really matters on client sites that have to use specific terms in their language. And at leas I don’t always remember that I have to upload my customized mo-file after the update.
I’m also not sure what Caimin meant by “different way of translating” in his answer the last time I adressed this.
Thanks!
bub