List of usage examples for java.util Locale KOREAN
Locale KOREAN
To view the source code for java.util Locale KOREAN.
Click Source Link
From source file:Main.java
public static void main(String[] args) { Locale locale = Locale.KOREAN; System.out.println("Locale1:" + locale); // print the country of this locale System.out.println("Country:" + locale.getCountry()); }
From source file:HangulTextBoundaryDetection.java
public static void main(String s[]) { String hangul = "\u1112\u1161\u11ab\u1100\u1173\u11af"; BreakIterator ci = BreakIterator.getCharacterInstance(Locale.KOREAN); BreakIterator wi = BreakIterator.getWordInstance(Locale.KOREAN); System.out.print("Character Boundaries: "); printBoundaries(hangul, ci);/*from w w w. j ava2s.co m*/ System.out.print("\nWord Boundaries:"); printBoundaries(hangul, wi); }
From source file:Main.java
/** * Creates a media file in the {@code Environment.DIRECTORY_PICTURES} directory. The directory * is persistent and available to other applications like gallery. * * @param type Media type. Can be video or image. * @return A file object pointing to the newly created file. *//* w w w .j a v a 2 s.c om*/ public static File getOutputMediaFile(int type) { // To be safe, you should check that the SDCard is mounted // using Environment.getExternalStorageState() before doing this. if (!Environment.getExternalStorageState().equalsIgnoreCase(Environment.DIRECTORY_MOVIES)) { return null; } File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES), "ViewBody"); // This location works best if you want the created images to be shared // between applications and persist after your app has been uninstalled. // Create the storage directory if it does not exist if (!mediaStorageDir.exists()) { if (!mediaStorageDir.mkdirs()) { Log.d("CameraSample", "failed to create directory"); return null; } } // Create a media file name String timeStamp = new SimpleDateFormat("yyMMdd_HHmmss", Locale.KOREAN) .format(DateFormat.getDateTimeInstance()); File mediaFile; if (type == MEDIA_TYPE_IMAGE) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_" + timeStamp + ".jpg"); } else if (type == MEDIA_TYPE_VIDEO) { mediaFile = new File(mediaStorageDir.getPath() + File.separator + "ViewBody_" + timeStamp + ".mp4"); } else { return null; } return mediaFile; }
From source file:org.anyframe.oden.admin.authentication.CustomAuthenticationSuccessHandler.java
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { String language = request.getParameter("language"); Locale locale = null;// ww w.j av a 2 s . c o m if (language.equals("ko")) { locale = Locale.KOREAN; } else if (language.equals("en")) { locale = Locale.ENGLISH; } else { locale = Locale.KOREAN; } HttpSession session = request.getSession(); logger.debug("Multilocale : " + locale); session.setAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME, locale); super.onAuthenticationSuccess(request, response, authentication); }
From source file:com.hangum.tadpole.preference.ui.GeneralPreferencePage.java
@Override protected Control createContents(Composite parent) { Composite container = new Composite(parent, SWT.NULL); container.setLayout(new GridLayout(2, false)); lblLanguage = new Label(container, SWT.NONE); lblLanguage.setText(Messages.get().LoginDialog_lblLanguage_text); comboLanguage = new Combo(container, SWT.READ_ONLY); comboLanguage.addSelectionListener(new SelectionAdapter() { @Override/* w w w .j a va 2 s. c o m*/ public void widgetSelected(SelectionEvent e) { changeUILocale(comboLanguage.getText()); } }); comboLanguage.add(Locale.ENGLISH.getDisplayLanguage(Locale.ENGLISH)); comboLanguage.add(Locale.KOREAN.getDisplayLanguage(Locale.ENGLISH)); comboLanguage.setData(Locale.ENGLISH.getDisplayLanguage(Locale.ENGLISH), Locale.ENGLISH); comboLanguage.setData(Locale.KOREAN.getDisplayLanguage(Locale.ENGLISH), Locale.KOREAN); Label lblNewLabel = new Label(container, SWT.NONE); lblNewLabel.setText(Messages.get().DefaultPreferencePage_2); textSessionTime = new Text(container, SWT.BORDER); textSessionTime.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblExportDilimit = new Label(container, SWT.NONE); lblExportDilimit.setText(Messages.get().GeneralPreferencePage_lblExportDilimit_text); textExportDelimit = new Text(container, SWT.BORDER); textExportDelimit.setText(Messages.get().GeneralPreferencePage_text_text); textExportDelimit.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblHomePage = new Label(container, SWT.NONE); lblHomePage.setText(Messages.get().GeneralPreferencePage_lblHomePage_text); textHomePage = new Text(container, SWT.BORDER); textHomePage.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); new Label(container, SWT.NONE); btnCheckButtonHomepage = new Button(container, SWT.CHECK); btnCheckButtonHomepage.setText(Messages.get().GeneralPreferencePage_btnCheckButton_text); btnCheckButtonHomepage.setSelection(true); grpEmailAccount = new Group(container, SWT.NONE); grpEmailAccount.setVisible(false); grpEmailAccount.setLayout(new GridLayout(2, false)); grpEmailAccount.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1)); grpEmailAccount.setText(Messages.get().GeneralPreferencePage_grpEmailAccount_text); Label lblSmtpServer = new Label(grpEmailAccount, SWT.NONE); lblSmtpServer.setText(Messages.get().GeneralPreferencePage_lblSmtpServer_text); textSMTP = new Text(grpEmailAccount, SWT.BORDER); textSMTP.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblPort = new Label(grpEmailAccount, SWT.NONE); lblPort.setText(Messages.get().GeneralPreferencePage_lblPort_text); textPort = new Text(grpEmailAccount, SWT.BORDER); textPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblAccount = new Label(grpEmailAccount, SWT.NONE); lblAccount.setText(Messages.get().GeneralPreferencePage_lblAccount_text); textEmail = new Text(grpEmailAccount, SWT.BORDER); textEmail.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); Label lblPassword = new Label(grpEmailAccount, SWT.NONE); lblPassword.setText(Messages.get().GeneralPreferencePage_lblPassword_text); textPasswd = new Text(grpEmailAccount, SWT.BORDER | SWT.PASSWORD); textPasswd.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); if (SessionManager.isSystemAdmin()) { grpEmailAccount.setVisible(true); } initDefaultValue(); // google analytic AnalyticCaller.track(this.getClass().getName()); return container; }
From source file:com.egoists.coco_nut.android.util.EtcUtils.java
public static String getDateString(long millis) { String time = null;//from w w w. j a v a 2s . c o m if (Locale.getDefault().equals(Locale.KOREA) || Locale.getDefault().equals(Locale.KOREAN)) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd a hh:mm", Locale.getDefault()); time = formatter.format(new Date(millis)); } else { SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd a hh:mm", Locale.getDefault()); time = formatter.format(new Date(millis)); } return time; }
From source file:com.egoists.coco_nut.android.util.EtcUtils.java
public static String getSimpleDateString(long millis) { String time = null;// w w w . j av a 2s .co m if (Locale.getDefault().equals(Locale.KOREA) || Locale.getDefault().equals(Locale.KOREAN)) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy M d? a h mm", Locale.getDefault()); time = formatter.format(new Date(millis)); } else { time = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, Locale.getDefault()) .format(new Date(millis)); } return time; }
From source file:com.kth.baasio.baassample.utils.EtcUtils.java
public static String getSimpleDateString(long millis) { String time = null;//w w w .j a v a 2 s.c o m if (Locale.getDefault().equals(Locale.KOREA) || Locale.getDefault().equals(Locale.KOREAN)) { SimpleDateFormat formatter = new SimpleDateFormat("M d? a h mm", Locale.getDefault()); time = formatter.format(new Date(millis)); } else { time = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT, Locale.getDefault()) .format(new Date(millis)); } return time; }
From source file:com.microsoft.mimickeralarm.mimics.MimicWithForecastFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_forecast_weather_mimic, container, false); ProgressButton progressButton = (ProgressButton) view.findViewById(R.id.capture_button); progressButton.setReadyState(ProgressButton.State.ReadyAudio); mStateManager = new MimicStateManager(); mStateManager.registerCountDownTimer((CountDownTimerView) view.findViewById(R.id.countdown_timer), TIMEOUT_MILLISECONDS); mStateManager.registerStateBanner((MimicStateBanner) view.findViewById(R.id.mimic_state)); mStateManager.registerProgressButton(progressButton, MimicButtonBehavior.AUDIO); mStateManager.registerMimic(this); mTextResponse = (TextView) view.findViewById(R.id.understood_text); mTextResponse.setOnClickListener(this); myTTS = new TextToSpeech(getActivity().getApplicationContext(), new TextToSpeech.OnInitListener() { @Override/* w w w. ja v a 2s. c o m*/ public void onInit(int status) { if (status != TextToSpeech.ERROR) { myTTS.setLanguage(Locale.KOREAN); } } }); // Button finishButton = (Button) view.findViewById(R.id.fin_button); // Bundle args = getArguments(); // mShareableUri = args.getString("shareable-uri"); // // // Set up timer to dismiss the sharing fragment if there is no user interaction with the buttons // mSharingFragmentDismissTask = new Runnable() { // @Override // public void run() { // finishShare(); // } // }; // mHandler = new Handler(); return view; }
From source file:com.hangum.tadpole.login.core.dialog.LoginDialog.java
/** * Create contents of the dialog.//from www . j a v a2s . c o m * @param parent */ @Override protected Control createDialogArea(Composite parent) { Composite container = (Composite) super.createDialogArea(parent); GridLayout gridLayout = (GridLayout) container.getLayout(); gridLayout.numColumns = 2; gridLayout.verticalSpacing = 5; gridLayout.horizontalSpacing = 5; gridLayout.marginHeight = 5; gridLayout.marginWidth = 5; compositeHead = new Composite(container, SWT.NONE); compositeHead.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); compositeHead.setLayout(new GridLayout(1, false)); lblLoginForm = new Label(compositeHead, SWT.NONE); lblLoginForm.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); lblLoginForm.setFont(SWTResourceManager.getFont(".SF NS Text", 15, SWT.NONE)); lblLoginForm.setText(LoginDialogMessages.get().LoginDialog_WelcomeMsg); lblLabelLblhangum = new Label(compositeHead, SWT.NONE); lblLabelLblhangum.setText(String.format(LoginDialogMessages.get().LoginDialog_ProjectRelease, SystemDefine.MAJOR_VERSION, SystemDefine.SUB_VERSION, SystemDefine.RELEASE_DATE)); Composite compositeLeftBtn = new Composite(container, SWT.NONE); compositeLeftBtn.setLayout(new GridLayout(1, false)); Button button = new Button(compositeLeftBtn, SWT.NONE); button.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); button.setImage(ResourceManager.getPluginImage("com.hangum.tadpole.login.core", "resources/TDB_64.png")); //$NON-NLS-1$ compositeLogin = new Composite(container, SWT.NONE); compositeLogin.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); compositeLogin.setLayout(new GridLayout(3, false)); lblEmail = new Label(compositeLogin, SWT.NONE); lblEmail.setText(LoginDialogMessages.get().LoginDialog_1); textEMail = new Text(compositeLogin, SWT.BORDER); textEMail.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.Selection) { if (!"".equals(textPasswd.getText())) //$NON-NLS-1$ okPressed(); else textPasswd.setFocus(); } } }); textEMail.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); btnCheckButton = new Button(compositeLogin, SWT.CHECK); btnCheckButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (!btnCheckButton.getSelection()) { CookieUtils.deleteLoginCookie(); } } }); btnCheckButton.setText(LoginDialogMessages.get().LoginDialog_9); //$NON-NLS-1$ lblPassword = new Label(compositeLogin, SWT.NONE); lblPassword.setText(LoginDialogMessages.get().LoginDialog_4); textPasswd = new Text(compositeLogin, SWT.BORDER | SWT.PASSWORD); textPasswd.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { if (e.keyCode == SWT.Selection) { okPressed(); } } }); textPasswd.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); btnLogin = new Button(compositeLogin, SWT.NONE); btnLogin.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 2)); btnLogin.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { okPressed(); } }); btnLogin.setText(LoginDialogMessages.get().LoginDialog_15); lblLanguage = new Label(compositeLogin, SWT.NONE); lblLanguage.setText(LoginDialogMessages.get().LoginDialog_lblLanguage_text); comboLanguage = new Combo(compositeLogin, SWT.READ_ONLY); comboLanguage.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); comboLanguage.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { changeUILocale(comboLanguage.getText()); } }); comboLanguage.add(Locale.ENGLISH.getDisplayLanguage(Locale.ENGLISH)); comboLanguage.add(Locale.KOREAN.getDisplayLanguage(Locale.KOREAN)); comboLanguage.setData(Locale.ENGLISH.getDisplayLanguage(Locale.ENGLISH), Locale.ENGLISH); comboLanguage.setData(Locale.KOREAN.getDisplayLanguage(Locale.KOREAN), Locale.KOREAN); compositeTail = new Composite(container, SWT.NONE); GridLayout gl_compositeTail = new GridLayout(4, false); gl_compositeTail.verticalSpacing = 0; gl_compositeTail.horizontalSpacing = 0; gl_compositeTail.marginHeight = 0; gl_compositeTail.marginWidth = 0; compositeTail.setLayout(gl_compositeTail); compositeTail.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); Label lblLicense = new Label(compositeTail, SWT.NONE); lblLicense.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); lblLicense.setText("License is GNU Lesser General Public License v.3"); Label lblDocument = new Label(compositeTail, SWT.NONE); lblDocument.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblDocument.setText("<a href='" + LoginDialogMessages.get().LoginDialog_lblNewLabel_text_1 //$NON-NLS-1$ + "' target='_blank'>Document</a>"); //$NON-NLS-1$ //$NON-NLS-3$ lblDocument.setData(RWT.MARKUP_ENABLED, Boolean.TRUE); Label lblIssue = new Label(compositeTail, SWT.NONE); lblIssue.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); lblIssue.setText( "<a href='https://github.com/hangum/TadpoleForDBTools/issues' target='_blank'>Feedback</a>"); //$NON-NLS-1$ //$NON-NLS-2$ lblIssue.setData(RWT.MARKUP_ENABLED, Boolean.TRUE); AnalyticCaller.track("login"); //$NON-NLS-1$ initUI(); return compositeLogin; }