spellcheck_common.h revision 06741cbc25cd4227a9fba40dfd0273bfcc1a587a
1// Copyright (c) 2009 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROME_COMMON_SPELLCHECK_COMMON_H_
6#define CHROME_COMMON_SPELLCHECK_COMMON_H_
7
8#include <string>
9#include <vector>
10
11class FilePath;
12
13namespace SpellCheckCommon {
14
15// Max number of dictionary suggestions.
16static const int kMaxSuggestions = 5;
17
18static const int kMaxAutoCorrectWordSize = 8;
19
20FilePath GetVersionedFileName(const std::string& input_language,
21                              const FilePath& dict_dir);
22
23std::string GetCorrespondingSpellCheckLanguage(const std::string& language);
24
25// Get SpellChecker supported languages.
26void SpellCheckLanguages(std::vector<std::string>* languages);
27
28
29// This function returns ll (language code) from ll-RR where 'RR' (region
30// code) is redundant. However, if the region code matters, it's preserved.
31// That is, it returns 'hi' and 'en-GB' for 'hi-IN' and 'en-GB' respectively.
32std::string GetLanguageFromLanguageRegion(std::string input_language);
33
34}  // namespace SpellCheckCommon
35
36#endif  // CHROME_COMMON_SPELLCHECK_COMMON_H_
37