-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Labels
APIPublic methods and propertiesPublic methods and propertiesFeatureSomething we can add later on without introducing a breaking changeSomething we can add later on without introducing a breaking change
Milestone
Description
Description
The only small change proposed here is to add language name and language code.
- Add language code
- If the specified language is not found, fallback to default, English.
- If a function is not translated it cannot be used. Return error as for unknown formula.
- Add test for language files that compare
language.functionskeys withregisteredPluginskeys - Language should be set as language code in Config Global settings #58
Line 41 in 37c1d1d
language: enGB,
Language definition
const lang: LanguageDefinition = {
languageCode: 'pl-PL',
errors: {
DIV_BY_ZERO: '#DZIEL/0!',
NAME: '#NAZWA?',
VALUE: '#ARG!',
NUM: '#LICZBA!',
NA: '#N/A',
CYCLE: '#CYKL!',
REF: '#ADR!',
},
interface: {
NEW_SHEET_PREFIX: 'Arkusz'
},
functions: {
'SUM': 'SUMA',
'ADD': 'DODAJ',
// ... more functions
},
}API proposal
public static registerLanguage(lang: LanguageDefinition): void;
public static getLanguage(name: string): LanguageDefinition;
public static getLanguages(): string[]; // ['pl-PL', 'en-GB', ...]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
APIPublic methods and propertiesPublic methods and propertiesFeatureSomething we can add later on without introducing a breaking changeSomething we can add later on without introducing a breaking change