Open mrleemon opened 5 years ago
Hi @mrleemon, thanks for the input! I'll take a look at this when I have a bit of time. It'll probably be next weekend, though, before I have a chance to really dive in, because it's been a LONG time since I did anything with internationalization.
In order to internationalize the buttons and titles found in the fg-admin.js file, you need to pass the localized strings from PHP via
data-
attributes. This is the way WooCommerce does it in its gallery metabox. For example:controller.php
...
<button type="button" class="button hide-if-no-js" id="fg_select" data-create="' . __( 'Arrange Images', 'featured-gallery' ) . '" data-update="' . __( 'Set Featured Gallery', 'featured-gallery' ) . '" data-insert="' . __( 'Set Featured Gallery', 'featured-gallery' ) . '">' . $selectButtonText . '</button>
...fg-admin.js