From 258479304f8b3a1212504f33598a72812d7a7873 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Tue, 25 Apr 2017 10:47:56 +0200 Subject: [PATCH] Use en as aspell language default in japanese environment: aspell does not support japanese and japanese users often have english texts --- src/aspell/rclaspell.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/aspell/rclaspell.cpp b/src/aspell/rclaspell.cpp index a6f13563..698832df 100644 --- a/src/aspell/rclaspell.cpp +++ b/src/aspell/rclaspell.cpp @@ -131,6 +131,14 @@ bool Aspell::init(string &reason) if (!lang.compare("C")) lang = "en"; m_lang = lang.substr(0, lang.find_first_of("_")); + if (!m_lang.compare("ja")) { + // Aspell has no support for Japanese. We substitute + // english, as Japanese users often have texts with + // interspersed english words or english texts. Japanese + // parts of the text won't be sent to aspell (check + // Rcl::Db::isSpellingCandidate()) + m_lang = "en"; + } } m_data = new AspellData;