<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Resolve language in CMS with default language</title><link>https://answers.axonivy.com/questions/2381/resolve-language-in-cms-with-default-language</link><description>&lt;p&gt;Hi Ivy team,&lt;/p&gt;
&lt;p&gt;AFAIK, if a CMS entry hasn't defined the user's current language, its default language will be used as an alternative one. Default language can be set by ivy.cms.setDefaultLanguage(Locale) but the above CMS entry still uses the old one. Is it the correct behavior?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Long Do&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2381/resolve-language-in-cms-with-default-language" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 20 Jan 2017 15:27:28 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2381/resolve-language-in-cms-with-default-language/2393</link><description>&lt;p&gt;The content language for a user is hierarchically defined and in the following order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;request&lt;/li&gt;
&lt;li&gt;override&lt;/li&gt;
&lt;li&gt;ivy (designer simulation settings)&lt;/li&gt;
&lt;li&gt;browser&lt;/li&gt;
&lt;li&gt;client OS&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Most of the times the locale is defined via browser locale. But a locale on the request would override this behavior.&lt;/p&gt;
&lt;p&gt;To change the language to render for a certain user you can use the API on ISession:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ISession.setContentLocale(Locale loc) &lt;a href="http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/security/ISession.html#setContentLocale-java.util.Locale-"&gt;http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/security/ISession.html#setContentLocale-java.util.Locale-&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ISession.setFormattingLocale(Locale loc) &lt;a href="http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/security/ISession.html#setFormattingLocale-java.util.Locale-"&gt;http://developer.axonivy.com/doc/latest/publicApi/ch/ivyteam/ivy/security/ISession.html#setFormattingLocale-java.util.Locale-&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 20 Jan 2017 15:27:28 -0500</pubDate><guid>https://answers.axonivy.com/questions/2381/resolve-language-in-cms-with-default-language/2393</guid></item></channel></rss>