5.0.10 • Published 3 years ago

slm-select v5.0.10

Weekly downloads
98
License
-
Repository
-
Last release
3 years ago

📖 Implementation

Copy the following code in the entry point of your application for example: main.ts or main.js.

import 'slm-select/dist/slm-select.min.css'
import SlmSelect from 'slm-select'

Vue.use(SlmSelect, {
  applicationServer: 'the server of the SLM API from where your are trying to get the translations',
  applicationCode: 'your application code',
  fallbackLocale: 'your default locale',
  loadOnMount: 'by default is true'
})

Your entry point should look like this:

import Vue from 'vue'
import App from './App.vue'
import 'slm-select/dist/slm-select.min.css'
import SlmSelect from 'slm-select'

Vue.config.productionTip = false

Vue.use(SlmSelect, {
  applicationServer: 'the server of the SLM API from where your are trying to get the translations',
  applicationCode: 'your application code',
  fallbackLocale: 'your default locale'
})

new Vue({
  render: h => h(App),
}).$mount('#app')

🔥 Usage

In your vue template you need to put your key and label as you specified in SLM and the filter sx-translate

<template>
  <div>
    <p>{{ "placeholder.value" | sx-translate }}</p>
  </div>
</template>

To change the language globally, just add the slm-select component where you want

<template>
  <div>
    <slm-select/>
  </div>
</template>

In the prototype $slmAdapter we have: setLanguage, getCurrentLocale

5.0.10

3 years ago

5.0.9

4 years ago

5.0.8

4 years ago

5.0.6

4 years ago

5.0.5

4 years ago

5.0.7

4 years ago

5.0.4

4 years ago

5.0.3

4 years ago

5.0.2

4 years ago

5.0.1

4 years ago

5.0.0

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

2.0.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago