Languages and Currencies

#

Change The Default Language #

Go to admin > stores > configuration > locale options and change the Locale to the one you want.

Have More Than One Language With A Selector #

You will first need to add a store view. Go to admin > Stores > All Stores > Create Store View and create a new store view for the language you want, name it the name of your language. You can give it a short code like “fr” for french.

code-store-view

After you have saved it change to that store view with the selector on the top left:

config-language

Now go to admin > stores > configuration > locale options and change the Locale to the one you want, but first you will need to uncheck the “use website” checkbox

chose-language

Use Sub-Domain or Domain Name For Each Language #

This is possible, but out of scope for this document, please see: Multi-Store Setup

 

Installing A Language Pack #

You can find language packs in a few places:

  1. The official marketplace area for language packs
  2. Google for “Magento 2 French Language Pack” of course substituting the name of the language you are looking for. Generally they will tell you how to install the language pack with command line instructions. For example if you google “Magento 2 spanish language pack” you will find this page: https://github.com/Magento2Translations/language_es_es and on this page it gives the command line commands to run. Run these, then of course you will still need to change your locale as described above in admin > stores > configuration > locale options.
  3. Mageplaza has added quite a few of the official language packs from “crowdin” in an easier to install format, checkout: https://www.mageplaza.com/kb/magento-2-language-pack/ they have command line instructions for each one.

Adjusting Translations For The Rental Module #

Translations for our module are in vendor/salesigniter/releaserental2/i18n folder, within this folder you see a bunch of language files. If there is not a language file for your language please tell us and we’ll generate it for you using Google Translate. Since the non-english files are generated using this method they may not be correct translations, you can edit them in this folder and send us the edited .csv file so that it will be updated on our main extension. If you just want to edit a few translations there are a few methods to do so shown here on our docs: Editing Text & Emails

Special Note About Custom Options Used for “Start Date” and “End Date” Text On Shopping Cart, Invoices, Etc.

The calendar uses custom options of Magento 2 to log the start and end dates. These need to be translated in one of two ways:

  1. Mass update using spreadsheets specifically the “custom_options” field
  2. It can also be translated one by one by editing the custom options names on the edit product page making sure you are editing for the store view that you want to have with the translation

Using either of these methods it is important that you use the same exact translation text for “Start Date:” and “End Date:” (including colons) as is in the language file for your language for these 2 texts, we will use as an example the vendor/salesigniter/releserental2/i18n/fr_FR.csv file:

"Start Date:","Date de début:"
"End Date:","Date de fin:"
"Rental Buyout:","Rachat de location:"

So unless you have modified the translation for French in this example you would need to put for those custom options “Date de début:”, “Date de fin:”, and “Rachat de location:”. Otherwise if you don’t, it will duplicate the custom option. Example in admin edit product:

Example Language Translation and Example English Language Tweak

We will briefly describe one method specifically for languages though if you just want to change a few translations using your theme folder. We’ll suppose you are using the default Luma theme, if you aren’t your theme may be in app/design folder. So say we want to modify 2 translations, one for the English website and one for the Italian website. 

Make a file in vendor/magento/theme-frontend-luma/i18n/it_IT.csv for the Italian translations, here we’ll change the “Disabled Date” text which by default translates to “Data Disabilitata” and instead change it to “pericolo non disponibile” The format of this files is a comma separated value within quotes and the first column is the text to translate which should always be English and the second column is the translation. So this file will look like:

"Disabled Date","Pericolo non disponibile"

Now let’s say we want to change on the English website the text “Send items” to say “Check Out Items” so in this file vendor/magento/theme-frontend-luma/i18n/en_US.csv we put: 

"Send items","Check Out items"

After that is done you need to flush the Magento 2 cache and redeploy static contents using in command line: 

php bin/magento c:c
php bin/magento s:s:d

If you aren’t in production mode manually delete this folder: pub/static/frontend in order to flush any cached javascript translations

Currency #

This can be set in stores > configuration > general > currency setup

We will be closed January 4 - March 11, 2024. You can still order but for any installs or support tickets please expect a delayed response

Out of Office

FREE RENTAL CONTRACT PDF / WORD FILE

Please signup with your email and we'll send you the files 

We'll send you a few follow up emails with great Rental Business Tips, Special Offers, ways to increase sales, and more.

No thanks, I'll pass
15585

Get The Latest Rental Business Tips and Updates!

Special Offers, Product Updates, Insider Business Tips, sign up today to the Sales Igniter Email List!