From 83e4bd054e10380d66537089b2a23876b17000a6 Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 9 Jan 2011 23:59:12 +0000 Subject: [PATCH] Fix RTL languages git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7345 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/utils/translation.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/utils/translation.cpp b/src/utils/translation.cpp index df489f522..2659d872d 100644 --- a/src/utils/translation.cpp +++ b/src/utils/translation.cpp @@ -98,7 +98,20 @@ Translations::Translations() //I18N: Do NOT literally translate this string!! Please enter Y as the translation if your language is a RTL (right-to-left) language, N (or nothing) otherwise const char* isRtl = gettext(" Is this a RTL language?"); - m_rtl = (isRtl[0] == 'Y'); + const wchar_t* isRtlW = reinterpret_cast(isRtl); + + m_rtl = false; + + for (int n=0; isRtlW[n] != 0; n++) + { + if (isRtlW[n] == 'Y') + { + m_rtl = true; + break; + } + } + + //m_rtl = (isRtl[0] == 'Y'); #endif