Internationalization

Internationalization  shortly called  as  I18N.
where  18 represents the  no  of  letters  in  internationalization word  except I  and  N
Any  technology that  was not bounded  to a  particular  local user.
It  has  to  provide  services   for  all  the  local  users  through out  the  world.
From  one  local  user to  another  local  users there may be a chance  to variation in number representation, date  representation, message representation is  so  on as per their  local language,country  is system variant (o/s).
To  provide support  for  all the local users, very technology has  included  UNICODE representation  for characters, numbers  is soon.
Note:
In java  I 18 N support is  possible  because of  UNICODE  representation  only.    
all  the local users  were  classified  on  the  basics  of  the  following  3. Parameters.
Language: where language  could be  represented  in lowercase  letters.
Eg: te,ta, hi, en
Country : where  country could be  represented   in   uppercase  letters (capital letters)
Eg: IN,US,UK ,GE
System  variant : where  system  variant  could  be  represented  by  the  o/s used  by  the  particular   local  user.
Eg: win,lin,uni
To represent  a  particular  local  user, java technology  has provided  a  predefined  class.
java. util. Locale

To  create  local  object  with  the  respective local  parameter  we   should  use  the  following three constructors  from  locale  class.
Locale  (string  language);
Locale  (string  language, string country);
Locale  (string language, string country, string variant);

Locale  l= new  Locale  (“en,” “us”, “win”);

® To get  static number format  instance  we  should use 
public static  NumberFormat getInstance(Locale  l)

®To convert a number from present locale to target locale we use
public  StringFormat (locale  l)

®To get  date  formate Instance we  should  use 
public  static  DateFormat.getDateInstance ( int style, local  l)

®To convert  a  date  format  from  present  locale  to target locale  we  use
public  string format  (Date  d)

Eg:-  import  java.util.*;
         Import  java.text.*;
         Class  I18 N
         {
         public static void main (string args[]) throws IOException
          {
           Locale   l= new  Locale  (“en”, “IN”);
           NumberFormat    nf  =  NumberFormat. get Instance  (l);
           System.out.println(nf .format(10234. 567));
          DateFormat  df = DateFormat. getDateInstance  (0,l)  ;
          System.out.println(df.format (new Date  ( ) );
        }

       }

Related

Web Technology 262705673677661356

Post a Comment

emo-but-icon

item