summaryrefslogtreecommitdiff
path: root/zen/i18n.h
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-04-02 09:18:58 -0400
committerB. Stack <bgstack15@gmail.com>2024-04-02 09:18:58 -0400
commitd287d1d35a5bf96487d7abdeee8c42a851d5d292 (patch)
treeaa74abf9f7bf245cbff1add74dd2697da45e0611 /zen/i18n.h
parentadd upstream 13.4 (diff)
downloadFreeFileSync-d287d1d35a5bf96487d7abdeee8c42a851d5d292.tar.gz
FreeFileSync-d287d1d35a5bf96487d7abdeee8c42a851d5d292.tar.bz2
FreeFileSync-d287d1d35a5bf96487d7abdeee8c42a851d5d292.zip
add upstream 13.513.5
Diffstat (limited to 'zen/i18n.h')
-rw-r--r--zen/i18n.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/zen/i18n.h b/zen/i18n.h
index e858913a..28b8c087 100644
--- a/zen/i18n.h
+++ b/zen/i18n.h
@@ -35,6 +35,8 @@ struct TranslationHandler
virtual std::wstring translate(const std::wstring& text) const = 0; //simple translation
virtual std::wstring translate(const std::wstring& singular, const std::wstring& plural, int64_t n) const = 0;
+ virtual bool layoutIsRtl() const = 0; //right-to-left? e.g. Hebrew, Arabic
+
private:
TranslationHandler (const TranslationHandler&) = delete;
TranslationHandler& operator=(const TranslationHandler&) = delete;
@@ -50,8 +52,6 @@ std::shared_ptr<const TranslationHandler> getTranslator();
-
-
//######################## implementation ##############################
namespace impl
{
@@ -101,6 +101,15 @@ std::wstring translate(const std::wstring& singular, const std::wstring& plural,
//fallback:
return replaceCpy(std::abs(n64) == 1 ? singular : plural, L"%x", formatNumber(n));
}
+
+
+inline
+bool languageLayoutIsRtl()
+{
+ if (std::shared_ptr<const TranslationHandler> t = getTranslator())
+ return t->layoutIsRtl();
+ return false;
+}
}
#endif //I18_N_H_3843489325044253425456
bgstack15