473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

how to write a prototype

i have to write a prototype for default change in languages ie for example if i select for english english version of words shuld display if i select france then french version shuld be displayed...according to the countries...
Jul 11 '07 #1
3 1708
r035198x
13,262 8TB
i have to write a prototype for default change in languages ie for example if i select for english english version of words shuld display if i select france then french version shuld be displayed...according to the countries...
You'll need to provide more datails than that to get a helpful response. Where is your problem specifically?
Jul 11 '07 #2
i have to create a prototype in java in which according to the country name i give the language is defaultly changed.i will shw u the sample code...

import java.util.*;

public class I18NSample {

static public void main(String[] args) {

String language;
String country;

if (args.length != 2) {
language = new String("en");
country = new String("US");
} else {
language = new String(args[0]);
country = new String(args[1]);
}

Locale currentLocale;
ResourceBundle messages;
ResourceBundle errormessages;

currentLocale = new Locale(language, country);

messages =
ResourceBundle.getBundle("admin_messages_i18N",cur rentLocale);
errormessages =
ResourceBundle.getBundle("admin_error_messages_i18 N",currentLocale);

System.out.println(messages.getString("greetings") );
System.out.println(messages.getString("inquiry"));
System.out.println(messages.getString("farewell")) ;
System.out.println(errormessages.getString("error1 "));


language = "fr";
country = "FR";

currentLocale = new Locale(language, country);

messages =
ResourceBundle.getBundle("admin_messages_i18N",cur rentLocale);
errormessages =
ResourceBundle.getBundle("admin_error_messages_i18 N",currentLocale);

System.out.println(messages.getString("greetings") );
System.out.println(messages.getString("inquiry"));
System.out.println(messages.getString("farewell")) ;
System.out.println(errormessages.getString("error1 "));


}
}



this is the concept but i need to write a protype for it its just a sample....
Jul 16 '07 #3
JosAH
11,448 Expert 8TB
i have to create a prototype in java in which according to the country name i give the language is defaultly changed.i will shw u the sample code...

<snip>

this is the concept but i need to write a protype for it its just a sample....
But a prototype *is* just a (working and correct) example. What else do you
need? You have your proof of concept. (assuming your code works of course).

kind regards,

Jos
Jul 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: James Marshall | last post by:
I'm writing a library where I want to override document.write(), but for all document objects; thus, I want to put it in the prototype. I tried Document.prototype.write= my_doc_write ; but it...
16
by: Dennis M. Marks | last post by:
1. The getYear() function returns 2004 in IE and 104 in Netscape. Is that normal? It's no problem. I just add 1900 if it is less than 1000. Maybe there is an updated function. Let me know. 2. Is...
8
by: Ben | last post by:
Hi all, Just wondering how to write (using document.write) to a table cell. I have table with 3 rows and 3 colums. I want to write from within the Javascript to say third column of a first row....
2
by: jonniethecodeprince | last post by:
Hi all, I was wondering if anyone could help me display the HTML in a javascript that displays a table of data of prototype cinema listings. This code brings up a Syntax error: Object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.