load language_code to new shopping list

This commit is contained in:
smilerz 2022-02-25 13:52:56 -06:00
parent dae49ec5f3
commit 56c553c35d
No known key found for this signature in database
GPG Key ID: 39444C7606D47126
2 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,7 @@
<script type="application/javascript">
window.IMAGE_PLACEHOLDER = "{% static 'assets/recipe_no_image.svg' %}"
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
</script>
{% render_bundle 'shopping_list_view' %} {% endblock %}

View File

@ -934,6 +934,8 @@ export default {
this.ui = Object.assign({}, this.ui, this.$cookies.get(SETTINGS_COOKIE_NAME))
}
})
this.$i18n.locale = window.CUSTOM_LOCALE
console.log(window.CUSTOM_LOCALE)
},
methods: {
// this.genericAPI inherited from ApiMixin