Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
John Joseph Ryan
theme + language.properties modifications
August 4, 2010 10:12 PM
Answer

John Joseph Ryan

Rank: New Member

Posts: 15

Join Date: September 21, 2008

Recent Posts

I am creating a theme for a new site and the first thing I am trying to change is the top bar (this one has internationalization icons, Settings, Places, Sign In). I noticed that the there are several files I need to change init.ftl, portal_normal.vm, and portal_normal.ftl. I want to add the tags and url etc to the language.properties file because that is what it looks like the original is doing.

My quesiton is, "How to I customize this file, Do I add it to diffs and what folder under diffs to I put it in?". Am I off track? Any help will be appreciated.

-------------------------
init.ftl has
<#assign sign_in_text = languageUtil.get(locale, "sign-in") />
<#assign sign_in_url = htmlUtil.escape(theme_display.getURLSignIn()) />

I want to add a few sections like:
<#assign join_up_text = languageUtil.get(locale, "join_up") />
<#assign join_up_url = htmlUtil.escape(theme_display.getJoinURL()) />

--------------------------
portal_normal.ftl has:
<#if !is_signed_in>
<a href="${sign_in_url}" id="sign-in" rel="nofollow">${sign_in_text}</a>
</#if>
I want to add a few sections like:
<#if !is_signed_in>
<a href="${join_up_url}" id="join_up" rel="nofollow">${join_up_text}</a>
</#if>
---------------------------
portal_normal.vm has:
#if(!$is_signed_in)
<a href="$sign_in_url" id="sign-in" rel="nofollow">$sign_in_text</a>
#end
I want to add a few section like:
#if(!$is_signed_in)
<a href="$join_up_url" id="join_up" rel="nofollow">$Join_up_text</a>
#end
--------------------------

I believe all of these files are depending on language.properties and language_xx.properties.
Maarten van Heiningen
RE: theme + language.properties modifications
August 25, 2010 1:35 AM
Answer

Maarten van Heiningen

Rank: Regular Member

Posts: 173

Join Date: February 5, 2009

Recent Posts

Hello,

I would start with just changing the .vm files. like portal_normal.vm and not the other files.

You could also try not to use the classic theme but an other theme from the community dowloads.

Do you need to change any language properties? Almost any language is supported and works on the basis of first detecting what language is set in the webbrowser.

You can look into this by looking at the portal.propeties and implement the following line into your own portal-ext.properties file. (found in /webapps/ROOT/WEB-INF/classes/)

# Set locales languages
locales=nl_NL,en_US
## In this case Dutch and English US.

# Set this to 0 if the locale is not automatically prepended to a URL.
locale.prepend.friendly.url.style=0

# Set this to true to have unauthenticated user get content in their own language/locale
# Set to false to let guest user get company locale
locale.default.request=true