Lines Matching refs:locale
369 Locale locale = getLocaleFromFilename(name); in readLocalizedStringFromXmls() local
371 result.put(locale, localizedText.substring(1, localizedText.length() - 1)); in readLocalizedStringFromXmls()
467 private List<Integer> encodeTextInfo(int width, int height, String locale) { in encodeTextInfo() argument
475 locale.length())); in encodeTextInfo()
477 byte[] localeBytes = locale.getBytes(); in encodeTextInfo()
487 private Graphics2D createGraphics(Locale locale) throws IOException, FontFormatException { in createGraphics() argument
492 graphics.setFont(loadFontsByLocale(locale.getLanguage())); in createGraphics()
498 private int measureTextWidth(String text, Locale locale) in measureTextWidth() argument
500 Graphics2D graphics = createGraphics(locale); in measureTextWidth()
517 + locale); in measureTextWidth()
531 private void drawText(String text, Locale locale, String languageTag) in drawText() argument
533 LOGGER.info("Encoding \"" + locale + "\" as \"" + languageTag + "\": " + text); in drawText()
535 Graphics2D graphics = createGraphics(locale); in drawText()
549 graphics = createGraphics(locale); in drawText()
612 for (Locale locale : localizedTextMap.keySet()) { in generateImage()
615 if (!locale.toLanguageTag().equals("en-XC")) { in generateImage()
616 fallbackLocaleMap.put(locale.getLanguage(), locale); in generateImage() local
618 textWidth = Math.max(textWidth, measureTextWidth(localizedTextMap.get(locale), locale)); in generateImage()
624 for (Locale locale : localizedTextMap.keySet()) { in generateImage()
626 String languageTag = locale.toLanguageTag(); in generateImage()
627 Locale fallbackLocale = fallbackLocaleMap.get(locale.getLanguage()); in generateImage()
628 if (locale.equals(fallbackLocale)) { in generateImage()
631 languageTag = locale.getLanguage(); in generateImage()
632 } else if (localizedTextMap.get(locale).equals(localizedTextMap.get(fallbackLocale))) { in generateImage()
633 LOGGER.info("Skip parsing text for duplicate locale " + locale); in generateImage()
637 drawText(localizedTextMap.get(locale), locale, languageTag); in generateImage() local