Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:36:29+00:00 2026-06-12T23:36:29+00:00

I am working on Java application which should support English, Russia and Korean languages.

  • 0

I am working on Java application which should support English, Russia and Korean languages.

So I have prepared properties files in unicode for each languages. Then I get some String value using _ function from bundle to set it to

  • JLabel
  • JTextArea

InputStream stream = LocaleManager.class.getClassLoader().getResourceAsStream(path);
ResourceBundle bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8"));

public static String _(String key) {
    return bundle.getString(key);
}

For English and Russian it works perfect. For Korean JTextArea shows Korean charecters correctly but JLabel does not. It shows squares and in Eclipse console it shows ??, however Russia characters can be shown correctly in Eclipse console.

So seems like problem with JLabel.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:36:31+00:00Added an answer on June 12, 2026 at 11:36 pm

    As @mKorbel easily identified the problem was with JLabel font.

    On application startup identify the language from Locale.getDefault() or ask the user to select.
    Then generate the path to pick .properties file according to the language selected.

    In the file for Korean language I put (I use Eclipse AnyEdit plugin)
    Swimming=\u0412\u043e\u0434\u043d\u043e\u0435
    Running=\u0411\u044b\u0441\u0442\u0440\u043e\u0435

    InputStream stream = LocaleManager.class.getClassLoader().getResourceAsStream(path);
    ResourceBundle bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8"));
    
    //get internationalized version for "Swimming"
    String str = _("Swimming");
    
    //create and configure JLabel
    JLabel label = new JLabel();
    label.setVisible(true);
    label.setBackground(Color.yellow);
    label.setOpaque(true);
    
    //this line was the issue
    label.setFont(new Font("Verdana", Font.PLAIN, 14));
    
    //setting text which results in squares
    label.setText(str);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on a Java application which should have the capability to use
I have a calculator application in java swing, which is working properly with mouse
I'm working on a Java application which should allow users to optimize their daily
I have a Java application which should run on a server machine in the
I'm working on a Java EE (which I'm fairly new to) web application (JSF,
I'm working on a Swing application (currently running on Java 1.6 update 11) which
Im working on a Java Application that edits Pdf files. Furthermore a shell script
I'm working on a client-side Java application for which I want to create a
I am working on a client-server application in Java which is going to use
I am currently working on a small desktop Java application which will track various

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.