This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Cristina 1 year ago.

Assigned support staff: Cristina.

Author Posts
September 26, 2018 at 11:38 am #2766978

jensK-20

Hello!

I have 4 languages: DKK, GBP, NOK, SEK. I have a language switch widget and a language switch triggers a currency change.

Working:
DKK should translate site to Danish and change currency to DKK
GBP should translate site to English and change currency to GBP

Desired:
NOK should translate site to English and change currency to NOK
SEK should translate site to English and change currency to SEK

In short, I wish to keep english as the language of choice for NOK and SEK, but need all my products prices to change accordingly. This way I keep my translation needs to a minimum while offering customers the correct local currency price.

How do I achieve this goal?

Cheers

September 27, 2018 at 9:18 pm #2771813

Cristina

Hello Jens,

thanks for contacting and sorry for the attached debug information.

If I understood this correctly, the issue here is that you want to enabled the NOK and SEK sections of your shop using english language.

You could try to achieve this by defining a custom language for both languages. So you could define NOK and SEK as languages, and load english language files for these custom languages.

If you defined the standard norwegian and swedish you would get that language files loaded with the standard wordpress language files for that languages. While you could "trick" changing the .mo files in the languages folders, it could be reverted with updates. Therefore defining a custom language is a better option.

You could then define the default currencies and prices for these custom languages and get the same effect as you have now for DKK and GBP.

Using custom languages would allow to adapt to the usual way WPML works without having too much conflicts when passing the language information.

You also can profit from the existing english products cloning or duplicating them to the new created custom languages.

Here is documentation about defining custom languages:
https://wpml.org/documentation/support/editing-wpmls-languages-table/

Kind regards,
Cristina