summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/global.h b/include/global.h
index 1ccc92bb1..b9df3adff 100644
--- a/include/global.h
+++ b/include/global.h
@@ -20,6 +20,20 @@
#define INCBIN_S32 INCBIN
#endif
+// For debug menu translations.
+// DTR("こんにちは", "Hello") will expand to "Hello" with DEBUG_TRANSLATE,
+// or "こんにちは" if not.
+// The KANA macro will wrap Japanese text with encoding markers to
+// prevent mojibake while they are being translated.
+
+#if DEBUG_TRANSLATE
+#define DTR(japanese, english) _(english)
+#define KANA(txt) _("{JPN}" txt "{ENG}")
+#else
+#define DTR(japanese, english) _(japanese)
+#define KANA(txt) _(txt)
+#endif
+
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");