Search code examples
liferay-6

Multilanguage site name


Is this possible without modifying the source code ?

If not, what is a recommended way to do it. One solution would be to implement it inside the site custom theme to dynamically display several hardcoded strings depending on user locale. In that case how can I get current locale in the velocity template ?


Solution

  • It does not seem to be possible to achieve without code change.

    You can use theme-settings in your custom theme to store several site name strings which you can display to user based on locale.

    In velocity template, you can get user and current locale by code below.

    $user.getLanguageId()
    $theme_display.getLanguageId()
    

    HTH