Reading list Switch to dark mode

    Opencart Language Installation and Translation

    Updated 21 March 2016

    After doing development of so many modules for opencart, I realised an issue that so many our clients faced specially those, who don’t use the English language as store’s default language.

    We’ll be using Spanish language pack for example which you can download from here.

    Download the zip and unzip it and then upload files to opencart setup. Next step is adding new language, for this go to system->localization->languages and click on add new button. You’ll get below page to fill details about language that you are about to add.

    01

    To fill above form, every language pack provider provide details like below.

    Searching for an experienced
    Opencart Company ?
    Find out More

    02

    Fill these details in the above screenshot form as below.

    03

    And now just save it and you’ll see in the languages list as below.

    04

    As you can see that as of now default language is still english, that you have change from system->setting under the local tab, there is an option of language option, change it to spanish and default language will become spanish for store.

    The next major issue is, how to translate a module that is built on the multi language paradigm. If module is following language pattern for any module then it must have language files.

    If the module has language files for English and you want to translate them for Spanish, then at the very first copy all the language files from English language directory and paste all of them in Spanish directory in the same structure as it was in English language.

    For example, there is a file in module directory for English language called foo.php then copy this into the module directory of Spanish language.

    Suppose Enlish file has these keyword to be translated as below screenshot.

    05

    Then these will be translated to Spanish as below.

    06

    After doing above changes, when you’ll change the language from front end then, page will be translated in to Spanish language only for those keywords that exists in language file only.

     

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    4 comments

  • mahmoud gouda
    • Nishad Bhan (Moderator)
  • Opencart B2B Marketplace
  • Opencart Marketplace Tax Manager
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home