0.1.7 • Published 3 years ago

svelte-translate-tools v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Svelte Translate Tool (inspired by angular i18n and svelte-i18n)

Translation tools to extract/generate/compile translation files for your Svelte App (must be used with the package svelte-translate) at build time.

Installation

npm install svelte-translate-tools -D

Dynamic translations usages

plugins: [
		extracti18n({languages:['en-GB','fr-FR'], defaultLanguage:'en-GB'}),
		generatei18n(),,
		svelte({
			preprocess: [	
				sveltePreprocess({ sourceMap: !production })	
			],
			...
		}),
		...
]

Precompiled translations usages

plugins: [
		extracti18n({languages:['en-GB','fr-FR'], defaultLanguage:'en-GB'}),
		generatei18n(),,
		svelte({
			preprocess: [	
				preprocess_compilei18n({language:"fr-FR"}),
				sveltePreprocess({ sourceMap: !production })	
			],
			...
		}),
		...
]

then replace your

<DynamicTranslatedApp>	
</DynamicTranslatedApp>

with

<PreTranslatedApp>	
</PreTranslatedApp>

TODO

  • support context/description in def() helper in order to extract them and complete xlf files require a fork on xliff library to use custom attributes
0.1.7

3 years ago

0.1.6

3 years ago

0.1.4

3 years ago

0.1.5

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago