5.0.10 • Published 5 years ago

slm-select v5.0.10

Weekly downloads
98
License
-
Repository
-
Last release
5 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

5 years ago

5.0.9

5 years ago

5.0.8

5 years ago

5.0.6

5 years ago

5.0.5

5 years ago

5.0.7

5 years ago

5.0.4

5 years ago

5.0.3

5 years ago

5.0.2

5 years ago

5.0.1

5 years ago

5.0.0

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

2.0.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago