It seems 2 lines I can not translate:
– Shipping Address Book
– The following addresses are available during the checkout process.
– Address Book
-Ronald
Great catch on the extra ‘o’ in WooCommerce, @ronald-van-arkel. However, I believe the label should still say “deactivated”, as Woo Address Book is turned off when WooCommerce is turned off.
I’ve been trying to make the plugin internationally accessible. The next release should coming out soon with better translation ability. If you want to try it out, you can download the beta here: https://github.com/hallme/woo-address-book/tree/code-cleanup
Any recommendations on resources for setting up a .PO file? I can look into that for the next release.
Hello Gary,
Sorry about the “deactivated” part, I did not know the context of it and just ran into it when I was translating the plugin for my website.
I’m not a programmer, just a simple user, so I cannot tell you how to add translatable strings to the code. For now, I’m using code, besides locotranslate, in my funtions.php to translate:
add_filter('gettext', 'translate_shipping');
add_filter('ngettext', 'translate_shipping');
function translate_shipping($translated) {
$translated = str_ireplace('Shipping', '', $translated);
return $translated;
}
add_filter('gettext', 'translate_address_book');
add_filter('ngettext', 'translate_address_book');
function translate_address_book($translated) {
$translated = str_ireplace('Address Book', 'Direcciones de envĂo', $translated);
return $translated;
}
add_filter('gettext', 'translate_long_line_1');
add_filter('ngettext', 'translate_long_line_1');
function translate_long_line_1($translated) {
$translated = str_ireplace('The following addresses are available during the checkout process.', 'Direcciones adicionales:', $translated);
return $translated;
}
By the way, why was chosen for a dropdown selector to select a saved shipping direction?
Do you want to expand this plugin and make a selectable billing address possible?
I have been looking like a plugin like the one you made for years now, happy I made a search today.
Thank you,
-Ronald
Thanks for sharing. I think you’ll be able to translate them in the next release. Keep and eye out, and let me know if you have any issues.
By the way, why was chosen for a dropdown selector to select a saved shipping direction?
Sorry, but I am not sure what you mean by this.
At this time, I am not intending to extend this into the billing address. Maybe in the future, but that’s not on the roadmap yet.
Glad you like the plugin!
Sorry for the delay, but I have finally put out the release for this update. Thanks for all of your input!
Hello Gary,
Looks like I have to be sorry as I didn’t see your previous post, sorry about that.
Let me test the new release to see if translation goes well. I will also try to explain how to make the plugin less confusing for customers when checking out, this might be a bit tricky as it must be compatible with every theme so I understand you went with a drop-down selector.
Thank you for the update,
-Ronald
Hello Gary,
Translation succesful! However, for loco-translate it will requiere a language directory to create a template:
wp-content/plugins/woo-address-book/languages
Thank you,
-Ronald
1.3.5 should take care of this for you. I’ve also added a .pot which should help with future translations. If your translation creates any .mo and .po files, let me know. I’ll happily include them in the next release.