Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 982bc57

Browse files
initialize plugin textdomain
1 parent 59437f4 commit 982bc57

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

includes/class-creativecommons.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ private function __construct() {
6161
public function init() {
6262
$this->plugin_url = plugin_dir_url( dirname( __FILE__ ) );
6363

64-
// language setup.
65-
$this->locale = get_locale();
66-
$mofile = plugin_dir_path( dirname( __FILE__ ) )
67-
. '/languages/' . $this->locale . '.mo';
68-
load_textdomain( $this->localization_domain, $mofile );
64+
// language setup.
65+
$lang_dir = dirname( plugin_basename( __FILE__ ) ) . '/languages/';
66+
load_plugin_textdomain( $this->localization_domain, false, $lang_dir );
6967

7068
/*
7169
* add admin.js to wp-admin pages and displays the site

0 commit comments

Comments
 (0)