Developer forum

Forum » Dynamicweb 10 » Change default Product Language

Change default Product Language

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I am trying to change the default language of products from English to Romanian but I can't see any way of editing the "Default" option.

What am I missing?

The documentation here (https://doc.dynamicweb.dev/manual/dynamicweb10/settings/areas/products/internationalization/languages.html) states:

"If appropriate check Default to make this the default ecommerce language"

I don't see an option under "Actions"

Nor under the 3 dots:



I am running on DW10.15.1
Thank you,

Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You cannot change default language - you just change the regional setting of the default language. Much easier and does not break stuff.

We have removed the option from the UI since a lot of data breaks for people when they have that option. E.g. a lot of variant groups, relation groups, categories, datamodels etc. only exist in the original default language and when you change from "LANG1" to "LANG2" being default, everything breaks.

So intead you change "LANG1" from using "English -XX" in regional settings to be "Romanian" in regional settings - so you keep "LANG1" and then that is just romanian now.

You can still go switch in the database - but it requires a lot of records to be fixed.

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

I understand the reason.
The first thing is to add this info in the documentation. The documentation still mentions the ability to change the Default checkbox.
Secondly, I have initially tried your approach but the Culture value is read-only.
I ended up changing it directly in the database.
Thank you,

Adrian
 

 
Anders Ebdrup
Reply

Dear Nicolai,

 

I am not a big fan of the approach with changing the regional settings, because when looking into the Swift2 database, the language setup will be messed up when still using the references from the LanguageId in EcomLanguages:

 

Best regards, Anders

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Both valid points.

What would you expect to happen if I change default language from let's say ENU to DAN? The entire database exists in ENU only. Will all products dissappear? Should they be deleted? Should we flip all products language id from ENU to DAN? Should all product records that does not exist in DAN be created as copies of ENU (Potentially 100.000s of records). 

 
Dynamicweb Employee
Carsten Boll
Reply

I will have my team look at the documentation at least :)

 
Anders Ebdrup
Reply

Dear Nicolai,

 

Actually I would not expect much, except for the logic around the default language will change. Then I will have to do the needed changes for e.g. products.

 

Best regards, Anders

 
Anders Ebdrup
Reply

Dear Nicolai,

 

Actually I would not expect much, except for the logic around the default language will change. Then I will have to do the needed changes for e.g. products.

 

Best regards, Anders

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

@Nicolai maybe the "deactivation" should be a system setting?
I agree that some users may not be aware of the consequences but that does not mean all users should be affected.
Since this is a setting useful in the initial stages of the project, it is very likely that some of us may need it and we also know how to handle it.

Thank you,

Adrian

 

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

As long as we agree that e.g. all language inheritance on fields will blow up and break (all language inherited values will dissappear), then we can do it. Also it will probably cause other issues - like you have 2 languages that are translated, you set create a 3rd one and set the 3rd one to default, and now things will dissapear since the new default language has no translation of any elements - e.g. a variant group - so requesting it in the new language will return no name of that variant group....

We know it will be super buggy. I understand the need - but just flipping that flag seems like a bad solution. What if we wanted to do it in a smarter way?

 
Jimmy Hartington
Jimmy Hartington
Reply

We have also a new solution where I would like to set default language to Danish, since this is the default for this solution.

And since nothing is configured I am aware that nothing should break if I was able to change the default.

And if I had a solution which has been defined with multiple language and I would add a new language and set it to default I would be very aware that something will break.

 

So my suggestion would be to enable the ability to change the default, so new solutions can be created correctly.

And add a warning for when changing the default, that you should be aware that something could break.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Jimmy

I understand. We will make the feature - and try to ensure that change default language will not break stuff. (Though products and groups will potentiall have faulty data).

If you have a more or less empty solution, simply changing the culture from e.g. en-us to da-dk on the language that is currently default, will have the same effect as flipping the default flag.

But - we will enable it...

 
Jimmy Hartington
Jimmy Hartington
Reply

Thanks for planning to enable it.

On the current new solution I have used your suggestion to change English to Danish. And then I have changed Danish to English.

Only concern Claus and I have is if something uses the language ID, maybe this will break something in the future. Because that is not editable in the back-end.


 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

>> On the current new solution I have used your suggestion to change English to Danish. And then I have changed Danish to English.

If it's a brand new solution, woudln't changing the default in the database directly make more sense? You're going to have a lot of trouble with integration engineers needing to import Danish into a language ID called ENU and vice versa :-)

Imar

 
Jimmy Hartington
Jimmy Hartington
Reply

Thanks for pointing this out, Imar.

I will discuss internally.

 

You must be logged in to post in the forum