Lost in Translation: WordPress and i18n

3,025 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,025
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
15
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Lost in Translation: WordPress and i18n

    1. 1. Lost in Translation WordPress i18n for Developers Zé Fontainhas Outernationalist @ Automattic ze.wordpress.com @_ZeF
    2. 2. José Zee Zoe Z Zay Zé
    3. 3. Localizing WordPress
    4. 4. Will it make you rich & famous?
    5. 5. NO
    6. 6. NO (well, maybe)
    7. 7. WordPress is global Exposure Feedback Make your code/theme better It’s easy
    8. 8. What? Themes Plugins Core BuddyPress, PollDaddy, IntenseDebate,...
    9. 9. How?
    10. 10. How? Wrap your strings (don’t forget the textdomain) Generate the .POT file Distribute!
    11. 11. Wrap your strings __($string, $domain) and _e($string, $domain) replace: echo "Some string"; with: _e("Some string", "myplugin");
    12. 12. Wrap your strings printf(__("There are %d comments.", "myplugin"), $count);
    13. 13. Set the textdomain load_plugin_textdomain($domain, $path); and load_theme_textdomain($domain, $path);
    14. 14. Generate the .POT file On the repository? Admin->Generate POT Otherwise checkout http://svn.automattic.com/wordpress-i18n/tools/trunk/ and php makepot.php wp-plugin your-plugin-directory
    15. 15. Codex bit.ly/wp-i18n Mailing list bit.ly/wp-polyglots
    16. 16. Distribute!
    17. 17. GlotPress http://glotpress.org
    18. 18. GlotPress Totally usable. Not less than a desktop client. Keyboard only editing, shortcuts. Very small and simple, but infinitely extensible. Just like WordPress. Perfect for team collaboration. Import and export gettext files. API to be sure everything is in sync.
    19. 19. GlotPress Also not ready! Want to help? Submit patches & ideas to http://trac.glotpress.org
    20. 20. GlotPress Live beta at: http://glotpress.wordpress.com
    21. 21. Thanks! @_ZeF http://everywhereelse.wordpress.com
    22. 22. ?

    ×