QloApps Forums
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    I8n Error / Hin Text in Controller

    Technical Help
    2
    2
    807
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      michi last edited by

      Hello,

      in existing php controller like:

      /.hotelcommerce/controllers/front/OrderOpcController.php

      still English Error Notes and Hints.

          if (!$this->context->cookie->checkedTOS && Configuration::get('PS_CONDITIONS')) {
              return '<p class="warning">'.Tools::displayError('**Please accept the Terms of Service.**').'</p>';
          }
      

      How can I replace this with I8n ? Using TPL like

      {l s='THE NEW ERROR'}
      

      does not work.

      1 Reply Last reply Reply Quote 0
      • V
        Vishal Singh Global Moderator last edited by

        Hi @michi,

        To translate this text in the controller you don't need to make any changes to the code. You can translate the error messages in QloApps with the following steps:

        1. Go to "Translations" in the "Localization" tab.
          Select the type of translation as "Error message translations" then select the language and click on modify.

        selecte_translation.png

        1. After this you will be able to update the translations for the error messages for the front controller.

        update_translation.png

        1 Reply Last reply Reply Quote 0
        • First post
          Last post