LPS-35567 resending pull with explanation --> read description please

From Brian:

I think the logic is wrong:

Locale contentsLocale = LocaleUtil.fromLanguageId(contentsLanguageId);
String contentsLanguageDir = LanguageUtil.get(contentsLocale, "lang.dir");

// LPS-35567

languageId = languageId.replace("iw_", "he_");
contentsLanguageId = contentsLanguageId.replace("iw_", "he_");

Why are we replacing the contentsLanguageId after we get the contentsLocale object. Shouldn't it be before?

Please resend.

Thx.


------

Answer:

Hi Brian, the logic is right for this reason:

- In liferay, we don't have the locale he for hebrew, we have the iw (as stated by the ISO we follow). In the last year, a new ISO has declared HE as the new languageId, but leaving IW working too (for backwards compatibility). 

- the version of ckeditor we are using is not following this strictly, since they only support he for hebrew.

For this reason, we need to obtain the liferay locale using IW (as we do everywhere in the portal), BUT for ckeditor, we need to pass the value HE