joomlatranslationvirtuemartcountry-codes

How to add translations for country names in Virtuemart?


I am setting up a Virtuemart website in German, but when I select a country for my shipping address, the countries show up in English instead of German.

I have tries to configure the country names in the Virtuemart countries configuration, but German translations I have entered there don't seem to work.

My configuration in Virtuemart Countries for Austria after translating to German:

Configuration in Virtuemart Countries

But the countries still show up in English on the website:

Countries show up in English


Solution

  • If translating a country name through the Virtuemart countries menu does not work, you might want to try adding/editing the country translations configuration file.

    In the case of German, add or edit the following file:

    administrator/components/com_virtuemart/language/de-DE/de-DE.com_virtuemart_countries.ini

    and make sure it contains the following content:

    COM_VIRTUEMART_COUNTRY_AUT="Österreich"
    COM_VIRTUEMART_COUNTRY_CHE="Schweiz"
    COM_VIRTUEMART_COUNTRY_DEU="Deutschland"
    COM_VIRTUEMART_COUNTRY_LUX="Luxemburg"
    

    To find the translation key for each country, you could check the file that contains the English translations for the country names, which is located at:

    administrator/components/com_virtuemart/language/en-GB/en-GB.com_virtuemart_countries.ini

    The website should now show the countries in German:

    Countries in German