WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Translating text from a plugin (3 posts)

  1. marcmtlca
    Member
    Posted 1 year ago #

    Hi,

    I am a bit of a wordpress beginner. I am using a plugin "ny-subscribe" to have a subscribe button for the users on my page. I have set up polylang to translate most of the strings but it doesnt translate the "subscribe" text posted to the page.

    I did some fishing around in the php files in the plugin and found that the strings are stored in a file called ny-subscribe-functions.php and it looks like:

    $admin_fields = array(
    array(
    'slug' => 'ny_subscribe_field_form_heading',
    'type' => 'text',
    'label' => __('Form Heading'),
    'val' => __('Subscribe')
    ),
    array(
    'slug' => 'ny_subscribe_field_label',
    'type' => 'text',
    'label' => __('Submit Button text'),
    'val' => __('Subscribe')
    ),
    )

    I have no idea how to add these strings to the polylang list. I tried using the pll_register_string inside of these php functions but it says that the function doesnt exist.

    would appreciate any help.

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Are these 'Form Heading', 'Submit Button text', and 'Subscribe' that you want to translate?

    If this is the case, I believe that the plugin is not correctly written: http://codex.wordpress.org/I18n_for_WordPress_Developers#Translating_Plugins

  3. marcmtlca
    Member
    Posted 1 year ago #

    it's the 'val' stuff I want to translate but yeah. thanks for the link I'll check it out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic