Component localization


#1

Hi,
I am doing (beneath others) a chinese localization. But while chinese Letters are correctly displayed in my tooltip window, there are only squares in the Tabs of my TabbedComponents and PopupMenu. (Russian on the other hand is also correctly displayed in TabbedComponents and PopupMenu).

Thanks!


#2

Tooltips use the TextLayout class to render text while all other components use the normal text rendering classes found in Juce.
The TextLayout class is capable of rendering all languages on Windows/Mac/iOS, both Simple and Complex. The normal text rendering classes can only render “Simple Text” Languages, however that actually covers most languages.

Chinese is considered a “Simple Text” language so it should display fine using the usual Juce controls. I think the reason you are seeing boxes is because the font you are using doesn’t have Chinese characters in it.

The TextLayout class also has automatic font fall back so even if you chose a font with no Chinese characters in it, behind the scenes it would automatically fallback to Arial Unicode MS and render the correct Chinese characters using that.


#3

Thanks!
I am using the default font, no “lookandfeel” either. The issue arises on OSX and Windows equally.
Cheers


#4

The default font (at least on Windows) doesn’t have Chinese character support. I’m guessing the same is true of OS X.
If you switch to the font to “Arial Unicode MS”, you will see the characters properly.


#5

Thanks!
“Arial Unicode MS” seems to be the choice for OSX. But its not recognized under Windows 7. “Microsoft JhengHei”, beneath others is available here. But I would prefer a cross-platform font with a more or less standard latin/chinese/cyril typeface. Am I asking too much?


#6

Me personally, I would embed the font in the application to make absolutely sure that it will appear correctly.