• Resolved l1va

    (@l1va)


    Hi,
    i am not familiar with php and wp that is why i asking.
    Does anybody know or can easily check where the code that loading phrases from database (i see separate table for phrases: wp_wc_phrases) is placed ?
    And what i should add to such places to load phrases by condition ?
    More precisely – i want to show different phrases for <html lang=”en”> or lang= “ru”. I do not need beautiful general solution (might be it exist?) , it can be hardcoded like:
    1. i add column in phrases table for lang=”ru”
    2. load needed phrases values from appropriate column.
    I need help with second step. Where and what to add. Or maybe other better solutions for that.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    There is no way to do this in phrase section.
    You should create two different forms for different languages.
    Please navigate Dashboard > Comments > Forms admin page, use the Default Form for EN. Create another form, set the language code in according field. So when you change your website language the form will be changed too. Each field label and form title can be managed in this page. You can insert different phrases in different language forms.
    Doc: https://wpdiscuz.com/docs/wpdiscuz-documentation/comment-forms/

    Thread Starter l1va

    (@l1va)

    Thanks for the answer, but yes, for forms – it works great – i have two forms for different languages, but near the form i have phrases like “leave first comment” and having form on english but phrase on russian – awful. That is why i am asking.
    As i understood from the answer – it could not be done, but could you explain a little bit deeper why? As i feel – it is not difficult to get parameter from request and path it to the database query. Thanks!

    Plugin Author gVectors Team

    (@gvectors-team)

    All other phrases comes form _ru.po _ru.mo language files. You just need to enable PO/MO files in Dashboard > Comments > Settings admin page end enable “Use Plugin .PO/.MO files” option.

    Thread Starter l1va

    (@l1va)

    Cool! That is what i searching! Thank you!
    Maybe the initial question was not so clear.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to load custom phrases by condition’ is closed to new replies.