Viewing 13 reply threads
  • Author
    Posts
    • #448
      Roland
      Member

      Hi,

      Question about Multilanguage Options:
      Piklist automatic sets the singular and plural forms for the labels and the Menu-Title (custom post type name in the menu). This works fine in english, but i have a translation for my custom theme in german and in the future for some other languages, and then it looks worth… ;o)

      Is there an option to disable the automatic settings for the singular and plural forms, and maybe like the core functions from WordPress to define all labels (like ‘Add New …’, ‘Edit …’, and so on)?

      When i register a new taxonomy with the core functions, i have the possibility to set each label via the $labels-varaible and prepare it for translation.

      Cheers, Roland

    • #449
      Roland
      Member

      One more: when i register a new Meta-Box, in the head i define the name of the Meta-Box with “Title:”, is there also an option to prepare it for translation? With the textdomain it doesn’t work…

      Thnx

    • #454
      Steve
      Keymaster

      @Roland– We need to do a better job with supporting multilanguage. The issue is that Piklist builds most of the translatable items dynamically.

      Any suggestions would be appreciated.

    • #462
      emzo
      Member

      The WPML guys have a lot of knowledge about WordPress multilingual support. With their Go-Global Program, they’ll even help with making themes and plugins compatible with WPML, and give developers a free subscription to their members-only forum. Maybe it would be worth getting in touch with them?

    • #463
      Steve
      Keymaster

      @emzo– Thanks for the suggestion. We contacted WPML a few days ago, and are in the beginning stages of working with them.

      Wish you posted this a few weeks ago, it would have saved us some time. 😉

    • #465
      emzo
      Member

      @Steve That’s awesome! Piklist looks absolutely fantastic – I love that it’s “built for developers”, and it looks like it’s going to be a huge time-saver for me. I only wish I’d known about it earlier. The only reservation I have are with multilingual support. I live in Wales, and a large percentage of my clients require multilingual sites. Knowing that you’re now talking to the WPML guys has really made my day. I’ll be happy to help out where I can.

    • #468
      emzo
      Member

      Can I suggest that where possible, if any WPML specific code is required, it would be better placed in a separate “bridge” plugin, rather than in Piklist core. This way, it keeps Piklist clean and minimal if multilingual capability is not required.

      Jason Bobich followed this approach with his Theme Blvd WPML bridge plugin. Also Gravity Forms has a separate WPML bridge plugin, as do many of the leading WordPress eCommerce plugins.

    • #469
      Steve
      Keymaster

      @emzo– Agreed. We would probably make it a Piklist Add-On, like Piklist Demos.

      Will post more here, as we move forward.

    • #470
      Roland
      Member

      @Steve: Many thanks for the quick answer.

      @all: Sure, WPML is a great plugin for multilingual websites. But there are two ways you can develop a multilingual site (or even more): with a plugin like WPML or with WordPress Multisite. Every project is different and so the solutions are different. I try to keep independent from plugins as most as i can. Because with every new WordPress Version you must trust, that the plugin-developers update the plugin as well. So Piklist is great, because it saves me a lot of time developing and it’s extreme flexible in use.

      At the moment i built a portal for a great company. The basic site is in german and the international site in english. But they go to other countries all over the world with their services, and in future they need own sites for every new country. Also with some different contents and features for each country. I decide for the multisite solution, it keeps the system more flexible. The Theme i wrote is multilingual-ready and i made the translations with the plugin Codestyling Localization. Works fine! The only plugin i use for the multilingual management is Multilingual Press. It’s a small plugin and also very flexible.

      So i think for the future will be good to keep the decision by the developer, if he wants to use a plugin like WPML (which is good for a site in different languages) or WordPress Multisite with the language support inside of Piklist. Like Piklist himself, it’s free to make everything what’s in your mind!

    • #485
      emzo
      Member

      @Roland I totally agree. Piklist can be made fully translatable in it’s own right, which is why I am advocating a separate plugin to provide any UI enhancements on top of Piklist if WPML (or some other multilingual plugin) is being used.

      For example, Stella is another promising multilingual plugin by Theme FM. They have just recently released an add-on plugin for Yoast’s WordPress SEO. Now WordPress SEO is fully translatable, but the add-on plugin provides a nice UI to set SEO option per language from the WordPress admin.

      I believe @Steve agrees that this is a sensible way forward.

    • #489

      Hi piklisters!

      I’m not sure that a wpml bridge is in fact needed. Here are my thoughts about this:

      1. piklist need to better respect wordpress i18n:
      – In many places, the code use the “__” function but without specifing the piklist text domain.

      Exemple : $title = __('Piklist Widgets') in class-piklist-widget.php:60
      It should be $title = __('Piklist Widgets', 'piklist')

      Using a plugin like codestyling localization (http://wordpress.org/extend/plugins/codestyling-localization/) helps because those strings appear in the “default” text domain (98 strings, including the piklist demos add-on).

      – Using i18n functions with function calls or variables result in untranslatable strings:

      Code like this : $title = __($title); or this $description = __('Widgets for the ' . get_current_theme() . ' Theme.'); is not translatable using usual tools.

      This blog article from Otto explain why you can’t do this:
      http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/

      2. In many places, piklist calls __() but with its own text domain and not the plugin text domain

      Exemple : in post_type_labels() there are calls like
      'name' => __(self::pluralize($label), 'piklist')

      It can’t works: i have a custom label, piklist pluralize it and then we ask gettext to find it in the piklist text-domain and obviously it won’t.

      3. Strings in files headers (title, etc.) are not translatable

      (see this thread: http://piklist.com/support/topic/title-translation/)
      Piklist uses get_file_data on those strings, but it is not enough.

      To be translatable on wordpress.org, wordpress plugins have to define their text domain and domain path in the main plugin file header:
      * Plugin name: my-plugin
      * Text Domain: my-domain
      * Domain Path: languages/
      (see http://codex.wordpress.org/File_Header#Plugin_File_Header_Example)

      Piklist could use these headers to translate the strings specified in other plugin file headers.
      Something along:
      – when you search for “plugin type: piklist”, store the text-domain of each piklist plugin ;
      – when rendering a view, call get_file_data() ; foreach header do header=__(header, plugin-text-domain).

      4. Piklist functions Pluralize and Singularize are only usable in english
      I don’t see this as a problem. These functions are very pretty if you work in english or for prototyping, you just write:
      ‘labels’ => piklist(‘post_type_labels’, ‘Demo’)
      and it works.

      But you can also specify all the labels if you want and it will work fine with piklist:
      ‘labels’ => array(
      ‘name’ => __(‘my cpt name’, ‘my-text-domain’),
      ‘add_new’ => __(‘add a my cpt record’, ‘my-text-domain’),

      ),
      (see : “labels” in http://codex.wordpress.org/Function_Reference/register_post_type#Arguments)

      5. i18n also have impact on dates formats and so on
      Code like this is probably not correct: $datef = __('M j, Y @ G:i');
      We should used the format defined in worpress options (get_option(‘date_format’)).

      Hope it helps !

      Cheers,

      Daniel

    • #491
      Steve
      Keymaster

      @Daniel– This is an EXTREMELY helpful breakdown. Piklist definitely needs some help in this area, and this is a great start. We’ll keep this thread open so we can get other comments, but I think your breakdown is a great place to start.

      Thanks so much!

    • #505
      Steve
      Keymaster

      @Daniel– STEP 1 of your 5 step plan will be in the next release… it’s the easiest one. 😉

    • #514
      Steve
      Keymaster

      Added Text Domain to all localized strings in v0.7.0.

Viewing 13 reply threads
  • You must be logged in to reply to this topic.