Any Open source Internationalization/localization framework for web application e.g. JSF, Struts, Spring MVC - jsf

I have created a JSF application where in to implement localization, I need to create separate property files for each locale. Is there any way that these can be generated dynamically or any means of reducing the effort to minimum. Google translator is not a option for me.
Update:
User A have stored Data-A in Hindi language in database, Some User B comes in from french, now i want my application to show Data-A to user B in language French.

Check this blog - http://www.mkyong.com/jsf2/jsf-2-internationalization-example/
MK Yong tries to explain what you might be looking for, with examples.
I don't know if this is what you were looking for, but hope it helps. Supporting muti locales are never easy. You end up having multiple views that support each locale.

Related

Joomla find front-end content in back-end

I have a text in the front-end which I can't locate it in the back-end.
Is there a way to search or to figure it out?
To be more specific there is a text which I wrote it some time ago but I can't find in which component belongs. There are no articles at all and it's not in the component that is assigned to this menu item.
With the limited information you've provided there's very little specifics we could provide. As is, we don't know if the text is in the database, the code or even part of a language definition. In addition, the text could be the result of your web server being compromised. If there are ads for Viagra and other stuff skating up this is midst likely the issue.
You can use any flavor MySQL client to search to see if stored in the database.
To search the code, use your IDE search functionality. If your not using an IDE, download Notepad++ and install, once launched hit + F to open search utility. There is a tab to search all files from a specific directory root, use this to search for the text.
Although the search will find a language override, you should not edit core files, but there is a tool to override core language definitions in Joomla's backend.
Good luck!

XPages - presenting an application in multiple languages

I have an XPages application which is available in 4 languages. I would like that each user can choose the language in which the application is presented to him. What is the best way of doing this? It seems to me that I need to set a user specific parameter but am not sure how to go about this. At the moment I use a scope variable to determine which language the application is displayed in. This scope variable is server specific so all users see the application in the same language. Now I would like the application to be presented in the langauge chosen by each user (although all users are accessing the application on the same server). In Notes this was possible by writing a value to the user .ini file. Is there an XPages equivalent of this?
The XPages Toolkit project has an Language bean that gives the options to set a specific language to an application or let the user decide.
http://www.openntf.org/main.nsf/project.xsp?r=project/XPages%20Toolkit
If you can't use the extension OSGI plugin checkout the java source on github
https://github.com/OpenNTF/XPagesToolkit
An implement what you need

Adding "posting" facility to a website

Hi
I am creating a website using HTML and CSS only and I want to add the following feature:
Any person visiting the site should be able to post a message and that message should appear below with his name and time of posting.
How do I go about creating it?
Please help.
Thanks In advance
You won't be able to do this using HTML and CSS only (at least not in any sane way).
You will need a database of some sort (e.g. MySql, Microsoft Access etc) and you will need some sort of server-side scripting language such as PHP, .NET, Ruby etc.
I suggest picking a language and then finding some tutorials. Most tutorials will take you through using a database.
This is completely impossible using HTML and CSS only. You will have to use a server-side scripting language.

How to extract data from Google Calendar and show in plain text

I would like to extract the data and event name from a google calendar then show it as plain text. When ever the calendar is updated I would like the text to reflect this. It will be a part of a web site that I am working on.
What would be a good way to go about this?
The GData apis are what you're looking for. There are APIs for .NET, PHP, and Java at least (having used all, they are all fine)[1]. I have used the Zend Framework's implementation [2] to great success making a timeclock application totaling the hours the members in our organization recorded on their Google calendars, and the .NET framework is just as good. For a website, this is the way to go.
There is also a nifty command line tool, though I have not has as much success with it (Both *nix and Windows command line, though of course you'll have much more processing power in *nix ;))
[1] http://code.google.com/apis/gdata/docs/client-libraries.html
[2] http://framework.zend.com/manual/en/zend.gdata.html
[3] http://code.google.com/p/googlecl/
[Edit]
The project I mentioned for building a timeclock is available at http://code.google.com/p/gcaltimeclock/
The files you are probably most interested in are http://code.google.com/p/gcaltimeclock/source/browse/application/controllers/calendars.php and http://code.google.com/p/gcaltimeclock/source/browse/application/views/calendars/timesheets.php

Are JSF/Seam/Spring suited for non-enterprise work? (website, not "web application")

I'm starting work on a new website (sort of an e-commerce product comparison thing) and I'm trying to choose what technologies to build it on. I've ruled out PHP and I don't think I want to use Python or Ruby. I really like Java and Hibernate so I started looking into Java-based web technologies.
My problem is that all of the documentation and examples I've read can't seem to stop repeating the words "enterprise" and "web applications." I'm afraid of ending up with giant XML configuration files and business-oriented components while losing the ability to actually design the website. From what I've read of JSF, I like the idea of reusable components, but I still want the ability to customize individual pages. So my question is, are JSF/Seam/Spring well-suited for non-enterprise development? If not, what Java technologies are?
I have just started looking into JSF/Seam so please forgive me if this is an uninformed quesiton. Thanks in advance. :)
No problem. The JSF/Seam stack gives you all the customization you want, and it has very few XML files. In fact, it uses a lot of annotations to define entities and components, so you don't have to worry about writing tou much XML (it is one of the reason why Seam was invented).
JSF's standard components are rendered as simple HTML tags, while if you want to go AJAX and use Richfaces it will be a little harder to customize it, but nothing dramatic. I can assure you that for the view part, you can write whatever you want in your webpages.
Here's a nice reference of how the JSF tags are rendered.
For the model and DB part, the JPA framework gives you the ability to work with simple Java Objects, and sometimes using it in an "enterprise" context with legacy schema is even more difficult, so don't worry.
For a simple website you may safely skip the EJB part, this will help you writing a more cleaner project structure. You can package all your website in a simple .WAR file.
As for the "enterprise" word, I think it is more related to the fact that the Java EE framework gives you the feature you may need in an enterprise context, (i.e. EJBs), but you can avoid them.
They don't bite.

Resources