|
Asper Header
1.0.14
The header injector extension
|
Comprehensive internationalization engine with intelligent language detection and message orchestration. More...
Go to the source code of this file.
Data Structures | |
| class | MessageProvider |
| Internationalization message provider with multi-language support and fallback mechanisms. More... | |
Variables | |
| import *as vscode from | vscode |
| import { messages } from './messageReference' | |
| const | instance = new MessageProvider() |
| Singleton instance of the MessageProvider for application-wide use. | |
| export const | getMessage = instance.get.bind(instance) |
| Exported function for direct message retrieval. | |
Comprehensive internationalization engine with intelligent language detection and message orchestration.
This module serves as the central internationalization (i18n) engine for the AsperHeader extension, providing sophisticated message management with automatic language detection, dynamic parameter interpolation, and robust fallback mechanisms. It ensures consistent multilingual user experiences across all extension interfaces and interactions.
I18n Architecture:
messageReferenceLanguage Support Matrix:
Message Types:
Parameter Interpolation System:
{paramName} style parameter substitutionFallback Strategy:
Integration Points: This module provides localized content throughout the extension ecosystem:
Performance Optimization:
Definition in file messageProvider.ts.
| export const getMessage = instance.get.bind(instance) |
Exported function for direct message retrieval.
| messageKey | The key identifying the message |
| optionsOrArg | Either options object with language override or first message argument |
| args | Additional arguments to pass to the message function |
Bound method of the singleton MessageProvider instance for convenient access throughout the application. Provides the same functionality as calling instance.get() directly but with simplified import syntax.
Usage examples:
Definition at line 232 of file messageProvider.ts.
| import { messages } from './messageReference' |
Definition at line 86 of file messageProvider.ts.
| const instance = new MessageProvider() |
Singleton instance of the MessageProvider for application-wide use.
Single instance ensures consistent language settings and message caching across the entire extension. Automatically detects user's VS Code language preference on initialization.
Definition at line 214 of file messageProvider.ts.
| import* as vscode from vscode |
Definition at line 85 of file messageProvider.ts.