Plugin Directory

Changeset 810176


Ignore:
Timestamp:
11/25/2013 03:24:54 PM (12 years ago)
Author:
Daniel Ostman
Message:

Added internationalization

Location:
separator-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • separator-widget/trunk/readme.txt

    r803092 r810176  
    3434== Changelog ==
    3535
     36= 1.0.1 =
     37* Added internationalization-support
     38* Added Swedish translation
     39
    3640= 1.0 =
    3741* First release.
  • separator-widget/trunk/separator-widget.php

    r803088 r810176  
    33 * Plugin Name: Separator Widget
    44 * Description: A separator widget
    5  * Version: 1.0
    6  * Author: Daniel Östman
     5 * Version: 1.0.1
     6 * Author: Daniel Östman
    77 * Author URI: http://www.danielostman.se
     8 * Text Domain: separator-widget
    89 * License: GPL2
    910 */
     
    3031);
    3132
     33/**
     34 * Internationalization, load language files from plugin-folder /languages/
     35 */
     36function myplugin_i18n() {
     37    load_plugin_textdomain( 'separator-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     38}
     39add_action('plugins_loaded', 'myplugin_i18n');
     40
    3241
    3342class Halvfem_Separator_Widget extends WP_Widget {
     
    3948        parent::__construct(
    4049            'halvfem_separator_widget', // Base ID
    41             __( 'Separator Widget', 'separator-widget' ), // Name
     50            __( 'Separator', 'separator-widget' ), // Name
    4251            array( 'description' => __( 'A separator', 'separator-widget' ), ) // Args
    4352        );
Note: See TracChangeset for help on using the changeset viewer.