MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / load_lang_config

Function load_lang_config

api/config.py:265–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263
264# Load language configuration
265def load_lang_config():
266 default_config = {
267 "supported_languages": {
268 "en": "English",
269 "ja": "Japanese (日本語)",
270 "zh": "Mandarin Chinese (中文)",
271 "zh-tw": "Traditional Chinese (繁體中文)",
272 "es": "Spanish (Español)",
273 "kr": "Korean (한국어)",
274 "vi": "Vietnamese (Tiếng Việt)",
275 "pt-br": "Brazilian Portuguese (Português Brasileiro)",
276 "fr": "Français (French)",
277 "ru": "Русский (Russian)"
278 },
279 "default": "en"
280 }
281
282 loaded_config = load_json_config("lang.json") # Let load_json_config handle path and loading
283
284 if not loaded_config:
285 return default_config
286
287 if "supported_languages" not in loaded_config or "default" not in loaded_config:
288 logger.warning("Language configuration file 'lang.json' is malformed. Using default language configuration.")
289 return default_config
290
291 return loaded_config
292
293# Default excluded directories and files
294DEFAULT_EXCLUDED_DIRS: List[str] = [

Callers 1

config.pyFile · 0.85

Calls 1

load_json_configFunction · 0.85

Tested by

no test coverage detected