Problem Localizing properties from my content model
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2014 08:30 AM
In a tutorial about content modeling I saw that for localization you can use ex. type.mm_document=Document and it works also for aspect, but I can`t make it work when I use prop.mm_index=Index. I have tried using
prop.mm_index=Index
mm_index=Index
mm.index=Index
mm_mymodel.property.mm_index=Index
mm_mymodel.type.mm_document.property.mm_index=Index
and what not….
I really need help.
I created a bean
< beans >
< !– Add Project Share messages –>
< bean id="${project.artifactId}_resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
< property name="resourceBundles">
< list>
< value>alfresco.module.${project.artifactId}.messages.mmModel< /value >
< /list>
< /property>
< /bean>
< /beans>
prop.mm_index=Index
mm_index=Index
mm.index=Index
mm_mymodel.property.mm_index=Index
mm_mymodel.type.mm_document.property.mm_index=Index
and what not….
I really need help.
I created a bean
< beans >
< !– Add Project Share messages –>
< bean id="${project.artifactId}_resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
< property name="resourceBundles">
< list>
< value>alfresco.module.${project.artifactId}.messages.mmModel< /value >
< /list>
< /property>
< /bean>
< /beans>
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2014 10:59 AM
Alfresco Share properties labels are taken from Alfresco Repository configuration.
From the Alfresco Repository side you should localize your models following the documentation:
http://docs.alfresco.com/4.2/concepts/content-model-localization.html
This means that in the Alfresco side you should declare the new properties labels using a property such as:
prefixModel_localNameModel.property.prefixModel_localNameProperty = yourLabel
For example considering the standard attribute Name:
cm_contentmodel.property.cm_name.title=Name
Hope this helps.
From the Alfresco Repository side you should localize your models following the documentation:
http://docs.alfresco.com/4.2/concepts/content-model-localization.html
This means that in the Alfresco side you should declare the new properties labels using a property such as:
prefixModel_localNameModel.property.prefixModel_localNameProperty = yourLabel
For example considering the standard attribute Name:
cm_contentmodel.property.cm_name.title=Name
Hope this helps.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 07:56 AM
I followed this tutorial but I realized that the properties in my case don`t have the prop.* they are all mm:*
http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#propertie...
http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#propertie...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 06:57 AM
I am a beginner with alfresco and I am having trouble still. Before I had created a file myModel.properties in a folder messages, and a web-extension folder with the bean
< beans >
< !– Add Project Share messages –>
< bean id="${project.artifactId}_resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
< property name="resourceBundles">
< list>
< value>alfresco.module.${project.artifactId}.messages.mmModel< /value >
< /list>
< /property>
< /bean>
< /beans>
They were in the Alfresco Share, and they worked for types and aspects but not for properties.
Then I put them in the Alfresco Repo in the same locations accordingly. But still have no success. I tried to add the following code
< property name="labels">
< list>
< value>alfresco/extension/myModel.properties</value>
< /list>
< /property>
in the bean where my content model was registered but I still can not make it to work.
Sorry I am such a pain but I followed the tutorial link you put and many others. Apparently I am making something wrong or not making something. In some of the tries I could not even start the repo because it kept giving me errors that it could not find the bundle — what ever that means.
Please
Help
< beans >
< !– Add Project Share messages –>
< bean id="${project.artifactId}_resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
< property name="resourceBundles">
< list>
< value>alfresco.module.${project.artifactId}.messages.mmModel< /value >
< /list>
< /property>
< /bean>
< /beans>
They were in the Alfresco Share, and they worked for types and aspects but not for properties.
Then I put them in the Alfresco Repo in the same locations accordingly. But still have no success. I tried to add the following code
< property name="labels">
< list>
< value>alfresco/extension/myModel.properties</value>
< /list>
< /property>
in the bean where my content model was registered but I still can not make it to work.
Sorry I am such a pain but I followed the tutorial link you put and many others. Apparently I am making something wrong or not making something. In some of the tries I could not even start the repo because it kept giving me errors that it could not find the bundle — what ever that means.
Please

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2014 09:44 AM
I solved it
I was supposed to add
< config evaluator="aspect" condition="nc:Aspekt1">
< forms>
< form>
< field-visibility>
< show id="mm:verzion" />
< /field-visibility>
< appearance>
< field id="mm:verzion" label-id="prop.mm_verzion" />
< /appearance>
< /form>
< /forms>
< /config>
Thanks anyway

< config evaluator="aspect" condition="nc:Aspekt1">
< forms>
< form>
< field-visibility>
< show id="mm:verzion" />
< /field-visibility>
< appearance>
< field id="mm:verzion" label-id="prop.mm_verzion" />
< /appearance>
< /form>
< /forms>
< /config>
Thanks anyway
