question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Language translations not working

See original GitHub issue

As per documentation I get the following errors:

Or if you pass a string and not an object as per documentation:

  • Invalid prop: type check failed for prop “language”. Expected Object, got String.

My Code: `import Datepicker from ‘vuejs-datepicker’; import {en, es} from ‘vuejs-datepicker/dist/locale’;

export default {
	mounted() {},
	components: {
		Datepicker
	}
}`

<datepicker language="{es}" placeholder="Teste 123"></datepicker>

<datepicker language="es" placeholder="Teste 123"></datepicker>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
charliekasselcommented, May 3, 2018

You need to bind the import to a data property of the Vue component, otherwise the component know nothing about it. For example:

import Datepicker from 'vuejs-datepicker';
import {es} from 'vuejs-datepicker/dist/locale';
export default {
  data() {
    return {
      es: es
    }
  },
  components: {
    Datepicker
  }
}
1reaction
rdominguecommented, May 25, 2018

You need to bind the import to a data property of the Vue component, otherwise the component know nothing about it.

It should be added in the readme then at this place ; https://github.com/charliekassel/vuejs-datepicker#translations

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix: Google Translate Is Not Working in Chrome and Android?
If Google Translate is not working in Chrome or your Android phone, do you know how to fix it? In this post, we...
Read more >
How to Fix Google Chrome Translate Not Working
Expand the Advanced section to the left side of the Settings panel, and then click Languages. Next, click Language under Languages (right-side ...
Read more >
How to Fix Google Chrome Translate Not Working - TechPP
8 Ways to Fix Google Chrome Translate Not Working · 1. Go to Settings and click on Languages. · 2. On the Languages...
Read more >
Translate Not Working in Chrome: 5 Quick Ways to Fix it
Click the menu button (three vertical dots) and select Settings. settings translate not working on chrome · Select the Language option. language.
Read more >
Fix: Google Translate not Working - Appuals.com
Try to translate the page/text in Google Translate you were having issues with. Then in the dropdown box of From, select “Detect Language”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found