I did a deeper search and it turns out there is a difference between the description of these two functions in the documentation and code.
Function ‘load_textdomain’ will also merge muliple .mo files for same domain: http://core.trac.wordpress.org/browser/tags/3.5.2/wp-includes/l10n.php#L310
So edir is right.
The function for use in the main plugin:
load_textdomain('acf', dirname(__FILE__) . '/lang/acf-' . get_locale() . '.mo');
and for use in add-ons, ex. ‘Optins Page’:
load_textdomain('acf', dirname(__FILE__) . '/lang/acf-options-page-' . get_locale() . '.mo');
I’ve tested this solution for normal and lite mode, and it works fine.
If you want to use my translation files for ‘Options Page’ add-on, you should rename it:
‘acf-pl_PL.mo’ => ‘acf-options-page-pl_PL.mo’
‘acf-pl_PL.po’ => ‘acf-options-page-pl_PL.po’
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.