non-system languages from cocoAspell are enumerated with long names - therefore a mapping from lang code to name is needed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36973 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stephan Witt 2010-12-20 21:45:41 +00:00
parent 94160f97c0
commit ac86039473

View File

@ -69,7 +69,7 @@ static NSString * toLanguage(AppleSpeller speller, const char * lang)
NSArray * languages = [speller->checker availableLanguages];
for (NSString *element in languages) {
if ([element isEqualToString:lang_]) {
if (0 == [element caseInsensitiveCompare:lang_]) {
result = element;
break;
} else if ([lang_ hasPrefix:element]) {
@ -104,7 +104,7 @@ SpellCheckResult AppleSpeller_check(AppleSpeller speller, const char * word, con
checkSpellingOfString:word_
startingAt:start
language:lang_
wrap:NO
wrap:(BOOL)NO
inSpellDocumentWithTag:speller->doctag
wordCount:NULL];