12/23/2023 0 Comments Get poedit license![]() Muplugins_loaded instead of plugins-loaded (which is not an action anyway: plugins_loaded is the correct action hook - note the underscore instead of the dash). Load_plugin_textdomain( MY_TEXTDOMAIN, false, plugin_dir_path( _FILE_ ) ) Īdd_action( 'muplugins_loaded', 'load_mu_plugin_textdomain' ) pot file below seems to have generated the correct translation strings: define( 'MY_TEXTDOMAIN', 'MY_TEXTDOMAIN' ) I'm not 100% sure this is the only issue that was preventing POEdit from correctly parsing my code (I'm not sure it actually cares about the WordPress side of things), but fixing these (stupid) errors and re-running POEdit from the. "Plural-Forms: nplurals=2 plural=n != 1 \n" "Content-Type: text/plain charset=UTF-8\n" ![]() "Report-Msgid-Bugs-To: Translator Name \n" # This file is distributed under the GNU General Public License v2 or later. pot file as it stands: # WordPress Blank Pot I realize there are a number of non-standard approaches from a POEdit perspective, but I feel I should be able to manually customize my. As you can see, the string is the same as the constant, so POEdit shouldn't have a problem finding things like _( 'my string', MY_TEXTDOMAIN ) I'm using the define() exclusively for IDE code completion. Leaving this here for a record of the problem. Note: there are typos in the above code that are addressed in my answer below. Load_plugin_textdomain( MY_TEXTDOMAIN, false, plugin_dit_path( _FILE_ ) ) Īdd_action( 'plugins-loaded', 'load_mu_plugin_textdomain' ) _loader.php has the following: define( 'MY_TEXTDOMAIN', 'MY_TEXTDOMAIN' ) pot file located at as a starting point, but I'm still getting similar results. I have also tried using the blank WordPress. I have purchased the Pro version, but I think my structure is too customized to be able to benefit from the automated features of Pro. This application is cross-platform, so you shouldn’t have any issues using it regardless of what you choose to use. ![]() I have a very strict directory structure I must adhere to within mu-plugins, but I would like POEdit to be able to help me generate translation files for specific code within this structure, while ignoring a bunch of others.Īt the moment, POEdit is having difficulty locating valid code. Poedit is a reliable and efficient software application that can be used to help your create and edit your catalogues as well as translate text from language to another quickly and without any hassle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |