$30
Internationalization and Localization
Create an application to explore the available locales included in the standard Java Development Kit.
The main specifications of the application are:
• Create a package with the name res. Inside this package create the files: Messages.properties, Messages_ro.properties.
#Messages_ro.properties file
#Messages.properties file prompt = Comanda ta:
prompt = Input command: locales = Localizarile disponibile
locales = The available locales sunt:
are: locale.set = Localizarea curenta
locale.set = The current locale este {0}
is {0} info = Informatii despre localizarea
info = Information about {0}:
{0} invalid = Unknown command invalid = Comanda necunoascuta
• Create the package com and implement the following classes describing commands:
o DisplayLocales: to display all available locales o SetLocale: to set the application current locale.
o Info: to display informations about the current or a specific locale. When the user sets a specific language tag, various information obtained using standard Java classes such as Currency or DateFormatSymbols should be displayed in a text area, as in the following example:
▪ Country: Romania (România)
▪ Language: Romanian (română)
▪ Currency: RON (Romanian Leu)
▪ Week Days: luni, marţi, miercuri, joi, vineri, sâmbătă, duminică
▪ Months: ianuarie, februarie, martie, aprilie, mai, iunie, iulie, august, septembrie, octombrie, noiembrie, decembrie
• Create the package app and the main class LocaleExplore. Inside this class, read commands from the keyboard and execute them.
• All the locale-sensitive information should be translated in at least two languages (english-default and romanian), using the resource files.
Resources
• Internationalization