mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
changing the name of the lang directory to languages and all references to it
This commit is contained in:
parent
fe371026c4
commit
adc84722d7
4 changed files with 31 additions and 3 deletions
|
@ -67,7 +67,7 @@ class Plugin_Name {
|
|||
|
||||
// Load plugin text domain
|
||||
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
||||
|
||||
|
||||
// Activate plugin when new blog is added
|
||||
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
|
||||
|
||||
|
@ -227,7 +227,7 @@ class Plugin_Name {
|
|||
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
||||
|
||||
load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
||||
load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/lang/' );
|
||||
load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
1
plugin-name/languages/index.php
Normal file
1
plugin-name/languages/index.php
Normal file
|
@ -0,0 +1 @@
|
|||
<?php // Silence is golden
|
27
plugin-name/languages/plugin-name.pot
Normal file
27
plugin-name/languages/plugin-name.pot
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Copyright (C) 2013 TODO
|
||||
# This file is distributed under the same license as the TODO package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: TODO 1.0.0\n"
|
||||
"Report-Msgid-Bugs-To: http://wordpress.org/tag/plugin-name\n"
|
||||
"POT-Creation-Date: 2013-05-10 11:23:19+00:00\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"PO-Revision-Date: 2013-05-10 10:37-0500\n"
|
||||
"Last-Translator: FULL NAME <email@example.com>\n"
|
||||
"Language-Team: LANGUAGE <translations@example.com >\n"
|
||||
"X-Generator: Poedit 1.5.5\n"
|
||||
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
||||
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: class-plugin-name.php:214
|
||||
msgid "Page Title"
|
||||
msgstr ""
|
||||
|
||||
#: class-plugin-name.php:215
|
||||
msgid "Menu Text"
|
||||
msgstr ""
|
|
@ -21,7 +21,7 @@
|
|||
* Text Domain: plugin-name-locale
|
||||
* License: GPL-2.0+
|
||||
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
||||
* Domain Path: /lang
|
||||
* Domain Path: /languages
|
||||
*/
|
||||
|
||||
// If this file is called directly, abort.
|
||||
|
|
Loading…
Reference in a new issue