diff options
author | B. Stack <bgstack15@gmail.com> | 2024-04-02 09:18:58 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2024-04-02 09:18:58 -0400 |
commit | d287d1d35a5bf96487d7abdeee8c42a851d5d292 (patch) | |
tree | aa74abf9f7bf245cbff1add74dd2697da45e0611 /zen/i18n.h | |
parent | add upstream 13.4 (diff) | |
download | FreeFileSync-13.5.tar.gz FreeFileSync-13.5.tar.bz2 FreeFileSync-13.5.zip |
add upstream 13.513.5
Diffstat (limited to 'zen/i18n.h')
-rw-r--r-- | zen/i18n.h | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 |