Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
fix(i18n): make sure we can load other languages
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrutjes committed Oct 16, 2017
1 parent fcf0624 commit 854c1db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@
* I18n.
*/
function algolia_load_textdomain() {
$locale = apply_filters('plugin_locale', get_locale(), 'algolia');

load_textdomain('algolia', WP_LANG_DIR . '/algolia/algolia-' . $locale . '.mo');
load_plugin_textdomain( 'algolia', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' );
}
add_action( 'plugins_loaded', 'algolia_load_textdomain' );

add_action( 'init', 'algolia_load_textdomain' );

require_once ALGOLIA_PATH . 'classmap.php';

Expand Down
Binary file added languages/algolia-it_IT.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions languages/it_IT.po → languages/algolia-it_IT.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2017-10-09 13:49+0200\n"
"PO-Revision-Date: 2017-10-16 18:02+0200\n"
"Language-Team: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
Expand All @@ -17,7 +17,7 @@ msgstr ""
"esc_html_x:1,2c\n"
"X-Poedit-Basepath: ..\n"
"X-Textdomain-Support: yes\n"
"X-Generator: Poedit 2.0.1\n"
"X-Generator: Poedit 1.8.11\n"
"Last-Translator: Giuseppe Pignataro <[email protected]>\n"
"Language: it_IT\n"
"X-Poedit-SearchPath-0: .\n"
Expand Down

0 comments on commit 854c1db

Please sign in to comment.