From 854c1db902d9496beeafac7cfa21f8b146a7e919 Mon Sep 17 00:00:00 2001 From: Raymond Rutjes Date: Mon, 16 Oct 2017 18:07:28 +0200 Subject: [PATCH] fix(i18n): make sure we can load other languages --- algolia.php | 6 +++++- languages/algolia-it_IT.mo | Bin 0 -> 10524 bytes languages/{it_IT.po => algolia-it_IT.po} | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 languages/algolia-it_IT.mo rename languages/{it_IT.po => algolia-it_IT.po} (99%) diff --git a/algolia.php b/algolia.php index 26acf152..a15fc357 100644 --- a/algolia.php +++ b/algolia.php @@ -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'; diff --git a/languages/algolia-it_IT.mo b/languages/algolia-it_IT.mo new file mode 100644 index 0000000000000000000000000000000000000000..b5d67dd198ec73d3ca1d45c321bbe9a27939c3ad GIT binary patch literal 10524 zcmb`MON?aKS;sHIVADVXhLG?`IMZPFm~>Tl&-gK^dDuM<+pYA>bb5N?L^2tlsybbD zJh$#G-$&2%u)tnKAPZ$ffCPd-M2G~$h6M^z7QiGTus~TLv53qgi)<3HKthNGg5UR@ zbL-XZ*gQ(A{`bB2+;hJ3egE%qzWRrUANaL|&t<+p#rNDhlEi{9KENM7|MWdc@{`~{ zgFgZOC-@-v-tSG49|R33*KP2f;FF*OuYex>Bk;rEyBYKhH~_c7&x11l-@xw!A9yHS zzZ3i!uHOg#0JsT$0=x$PHu!g-tXuGs$owjpgI@vP2R^ZsBoBi(K$cGS!5;xf;FrMH zK(>%v`2HmMVem5eJoph%?*9(>L*Va&9{f}A{h&dZS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1y=34B-Hjj2D#IlG*+;xs>oH40A`4n5<(oDs=98hY5jG8H2oQ<>b9?ga-J7!c|| zZ%25v97m)|kr=E^uaI2>AGISV>!1_br5s1lE5k)a&5Sz_r) zA%G1wyIoycf2?6ZTqM*gqB4}6xop5Z_D;R9c6+K-lEA?hJ|TJx!f+l{4Qfy50Z=Tx`H$llid$D^-gli58VBj9w2 zk=1}dQ%}vuYb}5@N@Bkvwv8zwMz590*x8a1k>;Uv4`srpIfr?r5c{9E5C0qK8w>gX literal 0 HcmV?d00001 diff --git a/languages/it_IT.po b/languages/algolia-it_IT.po similarity index 99% rename from languages/it_IT.po rename to languages/algolia-it_IT.po index 4c985bf7..2b27e2fc 100644 --- a/languages/it_IT.po +++ b/languages/algolia-it_IT.po @@ -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" @@ -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 \n" "Language: it_IT\n" "X-Poedit-SearchPath-0: .\n"