-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue using polylang and vue-js #13
Comments
Hey, I'm also struggling with Polylang and this starter theme. |
Nope , apparently it doesn't support Polylang very well... i will keep looking into it... |
I did a workaround for one of the issues (navbar not updating).
Now I'm trying to fix the blog page so that it only shows articles for the current language. |
Hey, how about adding the parameter ?slug=example&lang=LOCALE |
Hello, has anyone managed to implement with success vue.wordpress in a two-language blog? |
@Cnk001 Yes, but the site must reload. Personally, I use Polylang + Loco |
How can I add a lang switcher (widgets are disabled with VueWordpress), is it possible to link to a post in another language (e.g. from NavMenu)? |
See screen. Here I have a page in Polish. You can add a language switch normally and it works. |
Ok, great! I tried to do it in widgets before. I had to enable this option in "Screen options" according to https://polylang.pro/doc/i-cant-add-the-language-switcher-in-the-menus/ https://polylang.pro/doc/create-menus/ (number 3 and 4) Dzięki! ;-) |
@Cnk001 Cieszę się, że pomogłem! :) |
Do you resolved a problem with posts from all languages when you go to the homepage first time? |
Yes, I added language information in the header and pass it in the parameters, and added it to functions.php function include_language( $query ) if($lang) { |
hmmm, it almost works, unfortunately sometimes the posts on the main page don't load at all, there is an error in the console:
|
I'm displaying posts on the /blog subpage. This is how my request looks like - wherever I download anything I added lang parameter
in header.php:
|
Hmm, i think my main problem is that when I'm on the "sitename/en" page then the request is sent to the wrong address: sitename /en/ wp-json/wp/v2/posts/?per_page=10&lang=en&page=1 but in source page the url to wp-json is correct: sitename/wp-json/... without lang directory before wp-json so I hardcoded my domain in baseURL (in wp-content/themes/vue-wordpress/src/api/index.js) |
How do you switch between languages, the page refreshes? |
it was when I entered the post, then changed the language and clicked on the logo to go to the home page (posts listing). Currently trying to fix the link to the second language in the Single Post view (the first time the link is bad, only after refreshing is correct) and make other components also render after the first visit. I installed facebook comments (https://github.com/malicoo/vue-facebook) and put them in Single view, but they also appear only after second refresh the post. |
Hello i recently submited an issue , and tought it was resolved, but i was wrong!
So, I'm using polylang and vue js , i need to translate articles and pages from Portuguese to English. At first i thought there was a problem with my
routes.js
and i added:But i'm finding tons of bugs that i can get through, for example when switching to an english page, the vue program loads the "Single.vue" instead of the "Page.vue" ...The navbar does not change :(
But if i refresh the page or if i enter through an url the page and the navbar loads fine
The bugs usually ocurr while i browse in the program.
Furthermore the vue program also loads all of the articles , both the portuguese and the english :/
The poly lang plug in usually takes care of all the logic behind the language switch, but when used with vue it has lots of bugs!
This is more of a question than an issue! HOpe you could give me some help!
thanks in advance !
The text was updated successfully, but these errors were encountered: