Support » Plugin: WP Hotelier » Can we change the word Room?

  • Resolved Imran Siddiq

    (@flickimp)


    When setting this up for Cabins, it states that there is ‘1 room left’, and that the user can select NR. ROOMS

    Can we change the word ROOM to be Cabin?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author benitolopez

    (@benitolopez)

    Hello,

    You can use something like this in your functions.php file:
    https://gist.github.com/benitolopez/eeb7ee3707544ae9a4450497d454a817

    Alternatively, you can use a plugin like Loco Translate, Say what?, etc to translate the strings.

    Best Regards,
    Benito

    • This reply was modified 5 months, 1 week ago by benitolopez.
    • This reply was modified 5 months, 1 week ago by benitolopez.
    Thread Starter Imran Siddiq

    (@flickimp)

    Thanks
    Excuse my ignorance as I did try loco translate but it didn’t detect rooms.

    PS – if I was using Code Snippets, where would I add this?

    Plugin Author benitolopez

    (@benitolopez)

    I don’t know how Code Snippets work. That code must be placed in the functions.php file of your theme or child theme.

    Thread Starter Imran Siddiq

    (@flickimp)

    Out of curiosity, were you able to do this with loco, as it’s not finding the word ‘room’ for me when translating

    Plugin Author benitolopez

    (@benitolopez)

    Never tried, but it should. Those are just translatable strings. But with Loco you will need to translate all the strings that contain the word “room”.

    I mean, you literally have to take the phrase “Nr. Rooms” and translate it as “Nr. Cabins”, “Sorry, this room is not available on the given dates.” to “Sorry, this cabin is not available on the given dates.”, etc. All the strings.

    With that piece of code instead, you can solve your problem immediately.

    Thread Starter Imran Siddiq

    (@flickimp)

    Thanks
    Used your code in Code Snippets and it worked;

    But ‘1 room left!’ remains with the word room.

    Plugin Author benitolopez

    (@benitolopez)

    There was a missing line in the gist. This is the correct version:
    https://gist.github.com/benitolopez/eeb7ee3707544ae9a4450497d454a817

    Thread Starter Imran Siddiq

    (@flickimp)

    Brilliant

    I was going to add this to my CSS to remove it;
    .room__only-x-left { font-size: 0px; margin-bottom: 0px; }

    But adding your line keeps it all in one place
    Awesome

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.