<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Type localization missing in Backoffice in CRM and CX Q&amp;A</title>
    <link>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022285#M385003</link>
    <description>&lt;P&gt;Hey Wojtek,&lt;/P&gt;
&lt;P&gt;thanks for investigating into this issue. Your tip is very interesting. Unfortunately, it didnt solve our issue.&lt;/P&gt;
&lt;P&gt;We found, that within the project the default location service was overridden. For user anonymous it only returned a single language, such that the login screen with the backoffice cockpit did only show up one language.&lt;/P&gt;
&lt;P&gt;Unfortunately, the Typesystem cache for localizations is built upon the first request (that is anonymous of course) and, therefore, the cache ignores all other languages...&lt;/P&gt;
&lt;P&gt;We changed it back and applied the same trick only for the backoffice location service and with this in place, everything works fine:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;alias name="customerBackofficeLocaleService" alias="cockpitLocaleService"/&amp;gt;
 &amp;lt;bean id="customerBackofficeLocaleService" parent="backofficeLocaleService"&amp;gt;
     &amp;lt;property name="i18nService" ref="customerBackofficei18nService"/&amp;gt;
 &amp;lt;/bean&amp;gt;
 
 &amp;lt;bean id="customerBackofficei18nService" parent="defaultI18NService"&amp;gt;
     &amp;lt;property name="localeService" ref="anonymousOnlyEnForLoginLocalizationService"/&amp;gt;
 &amp;lt;/bean&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This might help others that want to limit the login to a certain UI language.&lt;/P&gt;
&lt;P&gt;Best bechte
&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2018 17:22:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2018-04-12T17:22:53Z</dc:date>
    <item>
      <title>Type localization missing in Backoffice</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaq-p/12022283</link>
      <description>&lt;P&gt;We are confused by an issue that we are currently running into with the hybris backoffice.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Actual Situation:&lt;/STRONG&gt;&lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; We define type localizations in the file &lt;EM&gt;customer-localization_en.properties&lt;/EM&gt;.
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; The customer uses two data locales &lt;EM&gt;en_US&lt;/EM&gt; (with fallback set to &lt;EM&gt;en&lt;/EM&gt;) and &lt;EM&gt;de_DE&lt;/EM&gt; (with fallback set to &lt;EM&gt;de&lt;/EM&gt;)
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; The login to the backoffice uses the locale &lt;EM&gt;en_US&lt;/EM&gt;.
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; After the installation and update everything looks fine.
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; After a restart of the server, some of the type localizations are missing, even hybris standard ones, like &lt;EM&gt;product.name&lt;/EM&gt;.&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Findings&lt;/STRONG&gt;&lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; We debugged already and found out that the type localization does not follow the configured fallback languages like the data languages do in the facade layer.
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; Instead, type localization will always fallback from Country isocode (e.g. &lt;EM&gt;en_US&lt;/EM&gt;) to Language isocode (e.g. &lt;EM&gt;en&lt;/EM&gt;), i.e. using only the first two characters.
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; We couldn't find, why the localization are not resolved properly&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Possible solutions&lt;/STRONG&gt;&lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; Copy type localization into a second file &lt;EM&gt;customer-localization_en-US.properties&lt;/EM&gt; (which we would like to avoid)&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; Has someone seen this issue before?
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; What could be the issue here?
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; Do you see different solutions for this issue?&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;</description>
      <pubDate>Thu, 12 Apr 2018 09:47:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaq-p/12022283</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-12T09:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Type localization missing in Backoffice</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022284#M385002</link>
      <description>&lt;P&gt;Hi Stefan,&lt;/P&gt;
&lt;P&gt;we recently discovered similar issues with languages with no fallback set. There is already a bug reported to enable fallback out-of-the-box. Anyway this will be fixed only in the latest version, therefore I would have a few questions and ideas:&lt;/P&gt;
 &lt;UL&gt;
  &lt;LI&gt;&lt;P&gt; which version you are using (we may consider backports)
&lt;/P&gt;

  &lt;/LI&gt;
  &lt;LI&gt;&lt;P&gt; do you have all the files named correctly (once you mention en-US and once an_US, where only the later is correct)&lt;/P&gt;

  &lt;/LI&gt;

 &lt;/UL&gt;
&lt;P&gt;If the problem is related to the fallback enablement I would suggest to try the following:&lt;/P&gt;
&lt;P&gt;Override the bean:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;alias name="defaultCngMainWindowComposer" alias="cngMainWindowComposer"/&amp;gt;
 &amp;lt;bean id="defaultCngMainWindowComposer" class="com.hybris.cockpitng.admin.CockpitMainWindowComposer" scope="prototype"/&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and re-implement the method &lt;EM&gt;com.hybris.cockpitng.admin.CockpitMainWindowComposer#doAfterCompose&lt;/EM&gt;, in which, before calling super, you should call &lt;EM&gt;de.hybris.platform.servicelayer.i18n.I18NService.setLocalizationFallbackEnabled(true)&lt;/EM&gt;. This should enable the standard resolution of fallback language-based tranaslations.&lt;/P&gt;
&lt;P&gt;Please let me know if this helps. If for any reason it will turn out to be too late (in the composer) as as a quick and dirty trial you may try to register a filter to enable the fallbacks.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Wojtek&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 11:45:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022284#M385002</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-12T11:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Type localization missing in Backoffice</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022285#M385003</link>
      <description>&lt;P&gt;Hey Wojtek,&lt;/P&gt;
&lt;P&gt;thanks for investigating into this issue. Your tip is very interesting. Unfortunately, it didnt solve our issue.&lt;/P&gt;
&lt;P&gt;We found, that within the project the default location service was overridden. For user anonymous it only returned a single language, such that the login screen with the backoffice cockpit did only show up one language.&lt;/P&gt;
&lt;P&gt;Unfortunately, the Typesystem cache for localizations is built upon the first request (that is anonymous of course) and, therefore, the cache ignores all other languages...&lt;/P&gt;
&lt;P&gt;We changed it back and applied the same trick only for the backoffice location service and with this in place, everything works fine:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;alias name="customerBackofficeLocaleService" alias="cockpitLocaleService"/&amp;gt;
 &amp;lt;bean id="customerBackofficeLocaleService" parent="backofficeLocaleService"&amp;gt;
     &amp;lt;property name="i18nService" ref="customerBackofficei18nService"/&amp;gt;
 &amp;lt;/bean&amp;gt;
 
 &amp;lt;bean id="customerBackofficei18nService" parent="defaultI18NService"&amp;gt;
     &amp;lt;property name="localeService" ref="anonymousOnlyEnForLoginLocalizationService"/&amp;gt;
 &amp;lt;/bean&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This might help others that want to limit the login to a certain UI language.&lt;/P&gt;
&lt;P&gt;Best bechte
&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 17:22:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022285#M385003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-12T17:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Type localization missing in Backoffice</title>
      <link>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022286#M385004</link>
      <description>&lt;P&gt;I don't know if this is related to your problem. But we had a wrong localization only in the promotion conditions and actions editor. It was english, although the rest of the backoffice was german.
This is cause by a wrong &lt;CODE&gt;I18NService#getCurrentLocale&lt;/CODE&gt; which was in fact the system locale.
&lt;CODE&gt;CockpitLocaleService&lt;/CODE&gt; returned the locale set at the login page.&lt;/P&gt;
&lt;P&gt;This solved our problem:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; public class CustomCockpitMainWindowComposer extends CockpitMainWindowComposer
 {
     @Override
     public void doAfterCompose(final Component comp) throws Exception
     {
         i18nService.setCurrentLocale(cockpitLocaleService.getCurrentLocale());
         super.doAfterCompose(comp);
     }

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And in our *backoffice-spring.xml:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;alias name="customCockpitMainWindowComposer" alias="cngMainWindowComposer" /&amp;gt;
     &amp;lt;bean id="customCockpitMainWindowComposer" class="com.kps.hybris.backoffice.cockpitng.customCockpitMainWindowComposer"
         parent="defaultCngMainWindowComposer" scope="prototype"&amp;gt;
 
         &amp;lt;property name="i18nService" ref="i18nService" /&amp;gt;
         &amp;lt;property name="cockpitLocaleService"
             ref="cockpitLocaleService" /&amp;gt;
     &amp;lt;/bean&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:09:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/crm-and-cx-q-a/type-localization-missing-in-backoffice/qaa-p/12022286#M385004</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-07-16T17:09:27Z</dc:date>
    </item>
  </channel>
</rss>

