Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/wp-db.php on line 668 Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/wp-db.php on line 668 Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/wp-db.php on line 668 Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-theme.php on line 554 Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-theme.php on line 595 Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-theme.php on line 535 Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-theme.php on line 544 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/comment-template.php on line 1739 Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/rest-api/class-wp-rest-request.php on line 952 Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/rest-api/class-wp-rest-request.php on line 972 Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/rest-api/class-wp-rest-request.php on line 984 Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/rest-api/class-wp-rest-request.php on line 995 Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 151 Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 175 Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 164 Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 186 Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 138 Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 75 Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 89 Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 110 Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 127 Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-block-list.php on line 199 Deprecated: Optional parameter $type declared before required parameter $wrapper is implicitly treated as a required parameter in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/class-fs-logger.php on line 145 Deprecated: Return type of FS_Key_Value_Storage::offsetExists($k) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 309 Deprecated: Return type of FS_Key_Value_Storage::offsetGet($k) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 317 Deprecated: Return type of FS_Key_Value_Storage::offsetSet($k, $v) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 301 Deprecated: Return type of FS_Key_Value_Storage::offsetUnset($k) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 313 Deprecated: Return type of FS_Key_Value_Storage::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 328 Deprecated: Return type of FS_Key_Value_Storage::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 339 Deprecated: Return type of FS_Key_Value_Storage::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 350 Deprecated: Return type of FS_Key_Value_Storage::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 362 Deprecated: Return type of FS_Key_Value_Storage::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 375 Deprecated: Return type of FS_Key_Value_Storage::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/freemius/includes/managers/class-fs-key-value-storage.php on line 389 Deprecated: Return type of WPCF7_FormTag::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/contact-form-7/includes/form-tag.php on line 395 Deprecated: Return type of WPCF7_FormTag::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/contact-form-7/includes/form-tag.php on line 387 Deprecated: Return type of WPCF7_FormTag::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/contact-form-7/includes/form-tag.php on line 381 Deprecated: Return type of WPCF7_FormTag::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/contact-form-7/includes/form-tag.php on line 399 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/contact-form-7/includes/mail.php on line 162 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: Optional parameter $errors declared before required parameter $instance is implicitly treated as a required parameter in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/so-widgets-bundle/widgets/contact/contact.php on line 916 Deprecated: Creation of dynamic property Elementor\Plugin::$icons_manager is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/elementor/includes/plugin.php on line 605 Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/script-loader.php on line 331 Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 21 Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 22 Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/streams.php on line 153 Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/pomo/translations.php on line 293 Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp.php on line 173 Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-term.php on line 198 Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-term.php on line 198 Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-term.php on line 198 Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class-wp-term.php on line 198 Mehrsprachigkeit bei PlugIns für WordPress – Will Maquire Warning: Only the first byte will be assigned to the string offset in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/class.wp-scripts.php on line 492

Mehrsprachigkeit bei PlugIns für WordPress

Deprecated: Optional parameter $content declared before required parameter $tag is implicitly treated as a required parameter in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-content/plugins/addons-for-elementor/includes/widgets/pricing-table.php on line 33
WordPress benötigt für jede weitere Sprache eine zusätzliche Sprachdatei. Die Grundsprache ist im Prinzip das, was der Entwickler im Code verbaut hat. Im besten Falle in Englisch. Aus dem Code generiert man eine Datei als Vorlage, aus der dann die Sprachdateien abgeleitet werden.

Die Struktur

In WordPress wird der Basisname eines Plugins Slug genannt. Der Name des Plugin-Verzeichnisses, bzw. der Name der Plugin-Datei gibt den Slug vor. Beide müssen identisch sein. Bitte keine Unterstriche verwenden.
/wordpress/wp-content/plugins/{slug}/{slug}.php
/wordpress/wp-content/plugins/my-plugin/my-plgin.php
Die Sprachdateien sind in einem Unterverzeichnis des Plugin-Verzeichnisses gespeichert. Standard bei WordPress ist languages.
/wordpress/wp-content/plugins/{slug}/languages/
/wordpress/wp-content/plugins/my-plugin/languages/
WordPress benötigt sogenannte “Maschine Object”-Dateien .mo für die Übersetzung. Das sind die eigentlichen Sprachdateien. Pro Sprache und Region wird eine Datei benötigt. Der Name einer Sprachdatei setzt sich aus dem Slug und der Länderkennung zusammen. Wie die .mo-Dateien erstellt werden erkläre ich später.
../languages/{slug}-{language}_{COUNTRY}.mo

../languages/my-plugin-de_DE.mo
../languages/my-plugin-en_US.mo
../languages/my-plugin-fr_FR.mo

Die PlugIn-Datei

Im Header der PlugIn-Datei kommt der Slug an sich nicht vor. Lediglich die Text-Domain muss eingetragen werden und so heissen wie der Slug. Aktuelle WordPress-Versionen machen das automatisch. Ebenso muss das Verzeichnis angegeben werden, das die Sprachdateien beinhaltet. Das macht Word-Press nur automatisch, wenn das PlugIn aus dem offiziellen WordPress-Pool kommt.
/*
 * Plugin Name: My Plugin
 * Author: Plugin Author
 * Text Domain: my-plugin
 * Domain Path: /languages
 */
Wir müssen WordPress noch auffordern, das die Sprachdateien auch geladen werden.
function my_plugin_load_languages() {
    load_plugin_textdomain( 'my-plugin', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
}
add_action( 'plugins_loaded', 'my_plugin_load_languages' );

Textausgaben im Code

Alle sprachabhängigen Texte müssen über WordPress-Funktionen umgeleitet werden.
__() Zuweisungen von sprachabhängigen Texten (Code Referenz bei WordPress)
// This works, but it's not multilingual.
$message = 'Hello, World!';    

// This is how to assign translated text correctly.
$message = __( 'Hello, World!' , 'my-plugin' ); 
_e() Ausgabe von sprachabhängigen Texten (Code Referenz bei WordPress)
// This works and it's multilingual.
echo __( 'Hello, World!' , 'my_text_domain' );  

// But this is how to display translated text correctly.
_e( 'Hello, World!' , 'my-plugin' );

Hinweise für Übersetzer

Der Entwickler kann dem Übersetzer auch Hinweise für seinen im Quelltext benutzten Text mit auf den Weg geben. So hat der Übersetzer nicht nur Text-Fragmente zur Übersetzung zur Verfügung, sondern kann an den Gedanken des Entwicklers anknüpfen.
Vor den Funktionen __() und _e() einfach die Bemerkung /* TRANSLATORS: */ hinzufügen.
/* TRANSLATORS: Welcome text when user signed in */
_e( 'Welcome to our world!' , 'my-plugin' ); 
Richtig wichtig wird die Verwendung von Hinweisen bei printf() oder sprintf() mit eingebetteten Variablen. Nur so kann der Übersetzer diese Variablen sprachabhängig sinnvoll einsetzen.
// Display translated text with embedded Variable.
printf(
    /* TRANSLATORS: %s: Name of a person */
    __( 'My name is %s.', 'my-plugin' ),
    $name
);
Werden mehrere Variablen eingebettet, können diese einfach durchnummeriert werden.
// Display translated text with more than one embedded Variable.
printf(
    /* TRANSLATORS: %1$s: Name of a person %2$s: Name of a city */
    __( 'My name is %1$s and i am from %2$s.', 'my-plugin' ),
    $name,
    $city
);
So kann bei der Übersetzung auch die Reihenfolge sprachabhängig geändert werden.
// Display translated text with more than one embedded Variable in custom order.
printf(
    /* TRANSLATORS: %1$s: Name of a person %2$s: Name of a city */
    __( 'I am from %2$s and they call me %1$s.', 'my-plugin' ),
    $name,
    $city
);

Sprachdateien erstellen und veröffentlichen

Ein Spracheditor wird jetzt benötigt, um die im Code vorbereiteten sprachabhängigen Texte zu finden und anschließend die gewünschten Sprachdateien zu erstellen. Ich hab das in einem eigenen Beitrag beschrieben.
Die generierten .mo-Dateien müssen in das Sprachverzeichnis kopiert und umbenannt werden. Der Dateiname beginnt mit dem Slug, einem Bindestrich und der Länderkennung.
../languages/{slug}-{language}_{COUNTRY}.mo

../languages/my-plugin-de_DE.mo
../languages/my-plugin-en_US.mo
../languages/my-plugin-fr_FR.mo
Das war’s.
Deprecated: Creation of dynamic property WP_Post::$db_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 809 Deprecated: Creation of dynamic property WP_Post::$menu_item_parent is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 810 Deprecated: Creation of dynamic property WP_Post::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 811 Deprecated: Creation of dynamic property WP_Post::$object is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 812 Deprecated: Creation of dynamic property WP_Post::$type is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 813 Deprecated: Creation of dynamic property WP_Post::$type_label is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 898 Deprecated: Creation of dynamic property WP_Post::$title is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 899 Deprecated: Creation of dynamic property WP_Post::$url is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 900 Deprecated: Creation of dynamic property WP_Post::$target is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 903 Deprecated: Creation of dynamic property WP_Post::$attr_title is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 912 Deprecated: Creation of dynamic property WP_Post::$description is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 922 Deprecated: Creation of dynamic property WP_Post::$classes is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 925 Deprecated: Creation of dynamic property WP_Post::$xfn is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 926 Deprecated: Creation of dynamic property WP_Post::$db_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 809 Deprecated: Creation of dynamic property WP_Post::$menu_item_parent is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 810 Deprecated: Creation of dynamic property WP_Post::$object_id is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 811 Deprecated: Creation of dynamic property WP_Post::$object is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 812 Deprecated: Creation of dynamic property WP_Post::$type is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 813 Deprecated: Creation of dynamic property WP_Post::$type_label is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 898 Deprecated: Creation of dynamic property WP_Post::$title is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 899 Deprecated: Creation of dynamic property WP_Post::$url is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 900 Deprecated: Creation of dynamic property WP_Post::$target is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 903 Deprecated: Creation of dynamic property WP_Post::$attr_title is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 912 Deprecated: Creation of dynamic property WP_Post::$description is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 922 Deprecated: Creation of dynamic property WP_Post::$classes is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 925 Deprecated: Creation of dynamic property WP_Post::$xfn is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu.php on line 926 Deprecated: Creation of dynamic property WP_Post::$current is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 386 Deprecated: Creation of dynamic property WP_Post::$current is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 386 Deprecated: Creation of dynamic property WP_Post::$current_item_ancestor is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 532 Deprecated: Creation of dynamic property WP_Post::$current_item_parent is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 533 Deprecated: Creation of dynamic property WP_Post::$current_item_ancestor is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 532 Deprecated: Creation of dynamic property WP_Post::$current_item_parent is deprecated in /mnt/web605/e0/76/51697076/htdocs/projects/maquire/wordpress/wp-includes/nav-menu-template.php on line 533