How to add a new language to SAP Hybris e- Commerce Storefront(Electronics UK Website)

孤人 提交于 2019-12-11 15:46:02

问题


My requirement: I want to add one more language say Spanish in footer section of language drop down list on Electronic UK storefront. Once we select the Spanish language our website content should change to Spanish Language.

I have read the hybris wiki related to Internationalization and Localization but I could not find any optimal solution.

Please help me in this to achieve the above functionality.enter image description here


回答1:


Open hmc or backoffice. Open your current base store, navigate to languages and add spanish to the list.

Notice, that there will be no data for the language, so your homepage might look very empty.

If you want to add localizations for the cms and product content, you have to add the language to all your catalog versions. Otherwise, your language wont show up in the cmscockpit/productcockpit.

Everything that appears on your homepage as words separated by dots (e.g. "search.placeholder") is not saved in the database. Those are spring messages. They are maintained in a file in your storefront. Find them in

/mystorefront/web/webroot/WEB-INF/messages/

by the names

  • base_XX.properties
  • theme-my-theme_XX.properties
  • site-my-site_XX.properties

where XX is the isocode of your language (in your case es). If the file does not exist, create it. You can use the english file (e.g. base_en.properties) as a template and change the values to spanish ones. Beware, there are a LOT!

There might be more pitfalls, but those are the ones, that came to my mind.



来源:https://stackoverflow.com/questions/47789616/how-to-add-a-new-language-to-sap-hybris-e-commerce-storefrontelectronics-uk-we

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!