Skip to content

crelte / translations / getTranslations

Function: getTranslations() ​

ts
function getTranslations(namespace?): TranslateStore;

Creates a translate store for the given namespace.

Example ​

svelte
<script>
	import { getTranslations } from 'crelte/translations';

	const t = getTranslations();
</script>

<h1>{$t('welcome_message')}</h1>

Parameters ​

namespace? ​

string = 'common'

Returns ​

TranslateStore