Milan Dinić's Blog
The Miscellaneous Ramblings from Serbia
  • Home
  • About
  • Copyright and Fair Use Guide
  • Disclaimer
  • Contact
  • WordPress
    • Plugins
      • Gravatar Signup Encouragement
Browse: Home / Blogging, Software, Tips & Tricks, Web design / How to use load_plugin_textdomain on activation of plugin

How to use load_plugin_textdomain on activation of plugin

By Milan Dinić on 11 November 2009

With my new plugin, Gravatar Signup Encouragement, I had a problem with translation of string that is used only on activation.

That string contains default message that is saved in database. No matter what I tried, it would always save original string, not translation.

After asking question on wp-hackers mailing list and exchanging several replies with Otto, I found solution for this. In your function that is used in register_activation_hook, you need to again use function load_plugin_textdomain, even if you loaded it already in init. It should be used before any string.

So if you encounter this problem, you know how to solve it.
Don’t forget to try my plugin mentioned here, Gravatar Signup Encouragement.

Posted in Blogging, Software, Tips & Tricks, Web design | Tagged plugin, WordPress

« Introducing Gravatar Signup Encouragement

Leave a Reply

Click here to cancel reply.

« Previous

Recent Posts

  • How to use load_plugin_textdomain on activation of plugin
  • Introducing Gravatar Signup Encouragement
  • Google News soon in Serbian, Bulgarian, Romanian and Slovakian
  • New AdSense Unit?
  • Video with scrolling AdSense Ads!

Categories

  • Asides
  • Blogging
  • Business
  • Fun
  • Internet Services
  • Marketing
    • Affiliate Marketing
      • AdSense
  • Miscellaneous
  • Personal
  • Politics
  • Serbia
  • Software
  • Technology
    • Search engines
      • Google
    • Web 2.0
    • Web design
      • SEO
  • The Internet
    • Usefull links
  • Tips & Tricks
  • Uncategorized
  • World

Blogroll

  • My Serbian blog

My websites

  • Cheap Web Hosting Catalog
  • Мон Репос Сокобања
  • Расадник „Анђелковић“
  • српски.биз

Copyright © 2006-2010 Milan Dinić's Blog.

Copyright | Disclaimer | Contact