cancel
Showing results for 
Search instead for 
Did you mean: 

Locales

jlbarrera
Champ in-the-making
Champ in-the-making
Hi!

I need get the language for all contents, for the current instance i use:

fc.getViewRoot().getLocale() 

where "fc" is:

FacesContext fc = FacesContext.getCurrentInstance();

But how i can get the language for a content?
3 REPLIES 3

jlbarrera
Champ in-the-making
Champ in-the-making
OK, i don't find the way to get the language for a item, so i have create my own class for this action.

but i have some problems…

I want create a new property for a item. The property "language"

How i can create this property for a item?

some idea?

andy
Champ on-the-rise
Champ on-the-rise
Hi

There is an aspect cm:localizable which is intended for this.
However, this is not currently fully used. All the supporting categories are not loaded in the bootstrap for a start.

If a node has this aspect then all of its properties conform to this locale.

See contentModel.xml

Regards

Andy

jlbarrera
Champ in-the-making
Champ in-the-making
In the contentModel.xml I add a property for the type "content":
<property name="cm:language">    
               <title>Language</title>
               <type>d:text</type>
            </property>

All work fine, there are a new property (language) type text. But i want that the user can select the language from a list and not input text.

So i think that i need create a new "data type" for this. this is correct?

if this is the way, how i must create the class for the new Data Type?
there are other way?

Thanks!!!