doc/plugin-i18n.dox

branch
soc.2013.gobjectification.plugins
changeset 36797
997a3fb7f1c0
parent 21828
1a1c2e5acb3f
equal deleted inserted replaced
36796:ebb632962d4e 36797:997a3fb7f1c0
71 - This is where things get a bit goofy. libpurple is going to try to 71 - This is where things get a bit goofy. libpurple is going to try to
72 translate our strings using the libpurple gettext package. So we have to 72 translate our strings using the libpurple gettext package. So we have to
73 convert them before libpurple attempts to. 73 convert them before libpurple attempts to.
74 - To do this, we're going to change the entries for name, summary, and 74 - To do this, we're going to change the entries for name, summary, and
75 description to NULL. 75 description to NULL.
76 - Next, locate your 'init_plugin' function. Your name for this function 76 - Next, locate your 'plugin_load' function. Your name for this function
77 may vary, but it's the second parameter to 'PURPLE_INIT_PLUGIN'. 77 may vary, but it's the third parameter to 'PURPLE_PLUGIN_INIT'.
78 - Now add the following within your 'init_plugin' function: 78 - Now add the following within your 'plugin_load' function:
79 @code 79 @code
80 #ifdef ENABLE_NLS 80 #ifdef ENABLE_NLS
81 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); 81 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
82 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); 82 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
83 #endif /* ENABLE_NLS */ 83 #endif /* ENABLE_NLS */

mercurial