multilanguage
-
Very nice plugin, I would like to buy pro version, but…
Is’nt it localizable? I need to show text in two languages…
Sure, I could do it by myself: it need just to add
__('
and
');
to each text string, but my work would be overwritten by every update of the plugin. So, what about to localize it in the source?
cheers
-
Localization is a feature on our timeline but not something we have developed yet.
We have the project on git hub. I would be will to trade a free copy of the API for some help localizing the plugin. Localization is not something we have a lot of experience in. This is our first plugin to have international interest.
By “Free copy of the API” I mean a free copy of our Developer Add-On
Thank you very much.
To localize MyBookTable you just need to change static texts (for example in taxonomies.php):
register_taxonomy('mbt_author', 'mbt_book', array( 'hierarchical' => true, 'labels' => array( 'name' => 'Authors', 'singular_name' => 'Author', 'all_items' => 'All Authors',eccetera…
with something like this
register_taxonomy('mbt_author', 'mbt_book', array( 'hierarchical' => true, 'labels' => array( 'name' => __('Authors', 'mybooktable'), 'singular_name' => __('Author', 'mybooktable'), 'all_items' => __('All authors', 'mybooktable'),eccetera…
so, internationalization plugins like WPML or similar will be able to identify “Authors”, “Author”, “All authors”, eccetera… as static text belonging to “mybooktable” and possibly replace it with the equivalent text in another language (it will be up to the end user fill in the translations, however). You should do this for each string intended for display eg. “books”, “series”…
Unfortunately I’m not enough skilled to be more helpful π
but it seems to be enough and here you can find a tutorial.cheers
So,
I am ready to send you the file taxonomies.php modified for internationalization. It seems to work.
There is still some string around, but it’s a good start.How can I contact?
We do all code collaboration through GitHub.
https://github.com/authormedia/mybooktable
This way you can submit the code right into our project for review. This will also allow others to submit changes as they find additional strings that need to get internationalized.
See http://lifehacker.com/5983680/how-the-heck-do-i-use-github if you need help using GitHub.
Go to http://www.authormedia.com/contact/ and I’ll get you connected with our developer directly.
done!
Thanks neovita!Silvio.
Silvio,
Could you post a link to your site? I am wanting to compile a list of sites using MyBookTable in other languages to promote on our blog.
of course!
this is my site http://www.laputa.itbut, as I wrote in a request for assitance by e-mail, the plugin on my site is not working properly due to a problem with WPML multilanguage: links to genre and authors do not work as you can verify here: http://www.laputa.it/libreria/
If you click on a genre or author you get a “nothing found” page. Similarly, link to bookshop home or other navigation links do not work.
deactivating WPML, Mybooktable back to work, but text strings in my site switch back to english!
Unfortunately, WPML is essential for those who have a blog in languages ββother than English.
wpml staff provides assistance to developers who want to make their plugins compatible: http://wpml.org/documentation/plugins-compatibility/
so, please fix it! π
We have a link to your site. See http://www.authormedia.com/mybooktable-1-3/
I’m sorry about the problems you are experiencing. What version of MyBookTable are you using?
thank you π
Mybooktable 1.3.0 with developer add-on 1.0.8
WordPress is 3.8.1 with WPML 2.9 “full” version
any news? :/
i’m still in trouble…No updates yet. It may be a while yet. We don’t have anyone in house who knows much about multi lingual :-\
π
solution (or at least another step forward):you need to add to mybooktable.php these lines:
Text Domain: mybooktablein header, just after the lines:
Author: Author Media Author URI: http://www.authormedia.com (add line here)and
load_plugin_textdomain('mybooktable', false, dirname(plugin_basename(__FILE__ )));just after the
*/So the result will be:
<?php /* Plugin Name: MyBookTable - WordPress Affiliate Bookstore Plugin URI: http://www.authormedia.com/mybooktable/ Description: A WordPress Bookstore Plugin to help authors sell more books. Author: Author Media Author URI: http://www.authormedia.com Text Domain: mybooktable Version: 1.3.0 */ load_plugin_textdomain('mybooktable', false, dirname(plugin_basename(__FILE__ ))); [...]after then webmasters can use .po/.mo dictionaries to set string translation, so it becomes localizable WITHOUT using WPML, and Mybooktables back to work! π
I I have already made ββthese changes on github:
https://github.com/sdellacqua/mybooktable/tree/patch-5Thanks silviod!
not at all π
however, it remains to resolve the conflict with WPML because the solution I adopted allows me to translate the site in Italian, but it is not enough for those who use wordpress in multiple languages. Many sites that run more than one language use WPML.
The topic ‘multilanguage’ is closed to new replies.