How to adjust data locales? - sap-commerce-cloud

I can adjust which data locales I would like to use via Backoffice, but if I change session I should select it again.
So I need to predefine which locales I Would like to use some .properties file.
Which parameter I should use?

Backoffice uses lang.packs property. In case there is a match between the language your browser uses and one of the languages in the system, the language should be pre-selected.
There is no additional storage, so when you close the browser the previously set language will not be set.

Related

Making Theme Config Fields multilang?

I know you can make non editable config values multilang in via src/Resources/config/config.xml but is it also possible for fields defined in src/Resources/theme.json?
This does not seem to be possible as in the admin panel you cannot switch the language at that point.

Kentico Language Packs

I need to change Kentico date format to dd/MM/yyyy. I tried following the settings here
https://docs.xperience.io/k12sp/configuring-kentico/reference-web-config-application-keys#ReferenceWeb.configapplicationkeys-Userinterfaceculturesettings
but looks like I'm gonna need a CMS.resx pack. Where do I get this language pack for Australia (en-AU)?
The language packs are available for download on the Devnet portal. However, in case of EN-AU, if you do not require translation of the resource strings to the Australian English (I guess the EN-AU is pretty much the same as EN-US in this case), you can simply copy the CMS.resx file and rename it CMS.en-au.resx.
Or, you can use the CMSDefaultUICulture web.config key and set the default UI culture to EN-AU and then, the system will take the CMS.resx as the EN-AU culture's resource file. For more details please see the documentation on setting up multilingual UI.

UI Message default value in Liferay portlet

Does anybody know, if in Liferay is possibility to use default value in ui message ? I mean I have two files .properties with translations, for example: en.properties:
welecome=Hallo everybody
someKey=
,and default.properites
welecome=Hallo everybody
someKey=value of some key
I want to achieve, that if I use:
<liferay-ui:message key="welcome" />
<liferay-ui:message key="someKey" />
with English language (where there is no translation for key 'someKey'), the displayed value will be:
Hallo everybody
value of some key
I mean, when there is no translation for some key, liferay portlet will use value from default properties file.
regards
With the standard naming conventions, you typically have files like Language.properties and Language_en.properties. When english language is displayed, but the entry is not contained in Language_en.properties, I expect the value from Language.properties to be shown.
However, in your case you define someKey as an empty value, which means that it's defined as exactly this.
Moreover, Liferay offers a "Language Builder" tool that you can run during development time (in the plugins-sdk just run ant build-lang. It will create configured language files automatically, automatically copying the values from the original file if they are not yet contained in the translated file.
If you have api credentials for bing, it can also use these to get an automatically translated value for various languages, but I'm not a big fan of these. Actually, I'm quite annoyed by automatic translations.

Multi language support in JSF

Is it possible to create multi language web pages with database resource?
Instead of "messages_EN.properties", "messages_HU.properties", and so on... I'd like to keep those texts in database. Is it possible to use this in the same way as properties files? For instance #{messages.hello} would depend on the current users language, and the text would be loaded from database, not properties file.
First you should check this:
Correct java.util.ResourceBundle Organization
The way to do it is described here:
messages.properties taken from db

language change of whole application JSF automatically

I need to change the language of whole project. I am using jsf. In default I used English. Now i need to convert it in Italian and Spanish.
I did it by manually writing in the property class. Just like:
and in xhtml I need to to put the property by manually.
My question is that, is there any way to convert it automatically?? I mean I just click on Italian, and it will display in italian language.
You need to create one file by language (with the correct name)
And fill every - key manually ...
Netbeans help you to display all languages in the same table.
The automaticaly option is Google trad.. it's not good solution.

Resources