• Resolved antoniezweers

    (@antoniezweers)


    Hi,

    I’m trying out Sensei and want to change the ‘course’ label into ‘theme’ and ‘lesson’ into ‘topic’, so that users do not take a course but a theme and do not complet a lesson but a topic.

    I have tried the Say What? and Loco Translate plugins, but neither work.

    Say What? support say that their plugin can ‘change any string that is marked up for translation’.

    Is the Sensei plugin marked up for translation?

    Is there a way of changing these strings?

    Thanks,

    Antonie

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Deric (a11n)

    (@dericleeyy)

    Are you trying to change the label on the buttons? If so, you will need to customize the button labels in the block editor or site editor.

    The translation template does not cover button labels such as the Take Course button:

    Thread Starter antoniezweers

    (@antoniezweers)

    Thanks for the reply!

    When I do that, the button disappears at the front end.

    Thread Starter antoniezweers

    (@antoniezweers)

    It works! I had to change the name in the Code Editor rather than the visual editor.

    Thank you very much for the help. This is so important for my website!

    Plugin Support Deric (a11n)

    (@dericleeyy)

    Glad to hear you manage to resolve this!

    Thread Starter antoniezweers

    (@antoniezweers)

    Thanks again.

    Is there a way to do this in a central place, because it is a lot of work to do it for each lesson individually, especially with all the ‘next lesson’ and ‘complete lesson’ buttons popping up.

    Thread Starter antoniezweers

    (@antoniezweers)

    Would such an addition to PHP work?

    add_filter(‘gettext’, function ($translated_text, $text, $domain) {
    if ($domain === ‘sensei-lms’) {
    switch ($text) {
    case ‘Lesson’:
    $translated_text = (‘Topic’, ‘sensei-lms’); break; case ‘lessons’: $translated_text = (‘Topics’, ‘sensei-lms’);
    break;
    }
    }
    return $translated_text;
    }, 20, 3);

    Plugin Support Joash (a11n)

    (@joashrajin)

    @antoniezweers regarding:

    Is there a way to do this in a central place, because it is a lot of work to do it for each lesson individually, especially with all the ‘next lesson’ and ‘complete lesson’ buttons popping up.

    That is a good question. Right now, it isn’t possible to do that without customization. It will be a lot easier when this is editable via the Site Editor, but that is still something our product team have on the roadmap.

    Would such an addition to PHP work?

    We can’t provide support for such customizations, but you can give it a try on a staging site to see if it helps solve your problem. If it does not, you can consider hiring a developer to create a snippet for you. Please try https://jobs.wordpress.net/ or https://jetpack.pro/ if you need help.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Changing course and lesson labels’ is closed to new replies.