misc/ already hosts optional supplemental modules (cpp/imgui_stdlib,
freetype/, fonts/). i18n fits the same pattern: opt-in, not part of
the core library. Update all include paths, Makefile, Xcode project
and README accordingly.
- imgui_demo.cpp: wrap all user-visible string literals with Tr(); add
Language menu in DemoWindowMenuBar (guarded by IMGUI_DEMO_ENABLE_I18N);
guard extern g_need_font_rebuild with IMGUI_DEMO_ENABLE_I18N + __APPLE__
- examples/example_apple_metal/main.mm: CJK font loading via RebuildFonts()
(always loads 2-glyph stub in English, full range in zh_CN); Language menu
triggers font atlas rebuild before next NewFrame(); wrap demo window strings
with Tr(); fix v1.92 ImplicitRefSize assertion by passing explicit SizePixels
to AddFontDefault()
- examples/example_apple_metal/Makefile: add i18n sources and
-DIMGUI_DEMO_ENABLE_I18N flag
- Works only for macOS: use XCode for iOS
- It will produce a raw exe. It will not a produce an macOS application bundle (i.e a folder that includes exe and resources). To get app bundles, use the XCode project.
- An adjustment was required in main.mm (for macOS only), to ensure that the exe can run without any plist or storyboard under macOS