{"id":5452282,"date":"2014-11-05T10:31:53","date_gmt":"2014-11-05T10:31:53","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/adding-localization-support\/"},"modified":"2016-08-22T04:08:33","modified_gmt":"2016-08-22T04:08:33","slug":"adding-localization-support","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/adding-localization-support\/","title":{"rendered":"Adding localization support"},"content":{"rendered":"<p>Hi,<\/p>\n<p>i just tried to more or less successfully add localization support to the plugin by adding the following code to twitter-tools.php:<\/p>\n<pre><code>function ap_action_init() {\n\tload_plugin_textdomain(&#039;twitter-tools&#039;, false, dirname(plugin_basename(__FILE__)));\n}<\/code><\/pre>\n<p>and<br \/>\n<code>add_action(&#039;init&#039;, &#039;ap_action_init&#039;);<\/code><\/p>\n<p>It more or less works and I&#8217;m using the CodeStyling Localization plugin to generate the *.po and *.mo files. Here I can see and translate all text strings of the twitter tools plugin. It does work on the website itself (I can change e.g. the &#8220;Follow Us on Twitter&#8221; text to my language), but it does not work on the wp-admin interface. To change languages I use the qTranslate Plus plugin, which in itself works fine on both, the site and the admin interface.<br \/>\nHowever, I don&#8217;t know what I&#8217;m missing, if any other files of the twitter tools plugin need to be updated as well. Any ideas??<\/p>\n<p>Thanks,<br \/>\nKlayman<\/p>\n<p>https:\/\/wordpress.org\/plugins\/twitter-tools\/<\/p>\n","protected":false},"template":"","class_list":["post-5452282","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5452282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5452282\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5452282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}