cancel
Showing results for 
Search instead for 
Did you mean: 

SmartEdit 6.2 issue

sreearumilli
Participant
0 Kudos

Hi,

I have setup yacceleratorstorefront with smartedit. I have changed the language of apparel UK site from en to es_CO. Then when I tried to access the smartedit,it is throwing the following error

java.lang.IllegalArgumentException: No matching DataLocale for es_co ( tried [es_co] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ar=ar->ar, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi} )

Have gone thorugh the document(https://answers.sap.com/questions/12750378/no-matching-datalocale-when-sending-email.html) and observed in DefaultContextInformationLoader Locale is creating using "new Locale" and this converting Locale to lower case. I have fixed and able to load the smartedit but not able to update/add components from drag and drop.After drag and drop(Paragraph component),I can see the dialog , added the content(localised content).When I click on save the content is not getting saved.

After debuging the DefaultLocalizedPopulator, observed the languages which doesn't have underscore(like en,de,) content is updating/saving properly. The languages which has underscore(like es_CO,en_US) content is not upadting/saving into model.

it's happening in OOTB yacceleratorstorefront.

Any inputs will be grateful.

Thanks,Inadvance. Sreenivas A.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kiran

I need to show "catalog - missing or not proper working hyphenation in specification tables on pdp."How to solve the issue .please help me.

Former Member
0 Kudos

Hi,

You may also try a different solution: use the CommonI18NService.

      private CommonI18NService commonI18NService;    
 
      @Override
     public <T> void populate(final BiConsumer<Locale, T> consumer, final Function<Locale, T> function)
     {
         getAllLanguages().map(language -> getCommonI18NService().getLocaleForIsoCode(language.getIsocode()))
                 .forEach(locale -> consumer.accept(locale, function.apply(locale)));
     }
 

kmanur
Discoverer
0 Kudos

I believe with the Hybris 6.2, it is using Locale.forLanguageTag which follows the https://en.wikipedia.org/wiki/IETF_language_tag (Each language tag is composed of one or more "subtags" separated by hyphens (-). ) If it happens to be underscore then it can cause issues.
You can override the DefaultLocalizedPopulator<>getLanguage to replace Locale.toLanguageTag from "hyphen" back to "underscore". That might help if you are still using the Locales as "en_US or en_GB etc.