Your example link is clear: When the country flag is selected, the link goes to your "LanguageAction", set the Locale like this:
request.getSession().setAttribute(Globals.LOCALE_KEY, Locale.FRANCE);
Finally, redirect the page back to the last viewed page. This will require you get the request URL before changing Locale.
I hope this helps.