0

We have a huge project with lot of custrols and xpages. And language conversion process would be then very time consuming. So, after some research I was thinking of building some UI using xpages in which I can able to translate each and every label which is available in .properties file.

However, it will be much more easier and faster to translate the project in multiple language. So then after some more research,I got a link of "Sven Hasselbach's " Blog "http://hasselba.ch/blog/?p=1070". In this blog the concept of Managed Beans are used.

In my xpage I am geting all .property file in combo-box

Code to get all .property file I am using:

              <xp:comboBox id="comboBoxFile"
                    value="#{sessionScope.PropertyFile}"
                    style="width:285.0px;height:32.0px;border-radius:6px">
                    <xp:selectItems>
                    <xp:this.value>
              <![CDATA[#{javascript:
               importPackage(language);
               language.AllPropertyFiles().getPropertFileList();
              }]]>
                    </xp:this.value>
                    </xp:selectItems>
                    </xp:comboBox>

So I am getting all the properties file like this.I have successfully used the java code to create "Managed Beans" as shown in link

I am sucessfull in getting all the labels which is needed to translate in a text field.

Till here every thing is going perfect as per the blog but as I am bit new in managed bean concept, Now am not able to save the edited labels from the xpage to back again to .property files. I just want some Idea how can I edit the .property file from xpage which will help me build the localization UI.

The blog says that saving the edited property file is explained in next part but I have searched alot for that but I didnt got it,I would like to read the 2nd part if some one is familiar with this blog.

Any advice , suggession or help in this will be really appreciated.

Ajit Hogade
  • 1,072
  • 9
  • 29

1 Answers1

0

You want to handle the language property files during design time. If you do that during runtime, each time you update the design (you are using a template, isn't it), your changes get lost.

Since you use version control, the property files are available on the file system. So management becomes easier.

The question how to manage that, has been asked before, so you want to check the answers and recommendations there.

Or check the PO Editor

Community
  • 1
  • 1
stwissel
  • 20,110
  • 6
  • 54
  • 101
  • Yes, PO Editor is definately a good tool for localization and the last option for me would PO Editor, but I have sucessfully retrieved all the .properties and edited all the string from my xpage,just the remaining part is to again mapping all the edited stings back to the .properties file. But any ways the answer is valuable in this case.Thank you.. – Ajit Hogade Dec 07 '15 at 04:21