SIERRA Posted May 9, 2018 Share Posted May 9, 2018 I want to display the web site in English and Chinese. I have the ‘English’ version of the site. After following attached steps the both versions are displayed in English only. Could you please suggest on this. Thanks. pw-reference-09052018.docx Link to comment Share on other sites More sharing options...
kongondo Posted May 9, 2018 Share Posted May 9, 2018 Moderator Note: Please don't double post Link to comment Share on other sites More sharing options...
SIERRA Posted May 9, 2018 Author Share Posted May 9, 2018 (edited) Sorry. By mistake this happened. Actually I thought to post this in 'Multiti language Support forum'. Edited May 9, 2018 by SIERRA Link to comment Share on other sites More sharing options...
kongondo Posted May 9, 2018 Share Posted May 9, 2018 5 hours ago, SIERRA said: Actually I thought to post this in 'Multiti language Support forum'. I've moved it for you. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 9, 2018 Share Posted May 9, 2018 How do the URLs look? Are there /en/ and /cn/ in them? Is the page available in all languages under settings? Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 9, 2018 Share Posted May 9, 2018 Just played around with one of my fun-sites and saw something that might clear your problem. Unless your homepage (id=1) doesn't have a "country-code url" multilanguage doesn't work properly on other side. Homepage: Other site: Default: http://nerd.to/processwire/snippets/ German: http://nerd.to/de/processwire/snippets/ 1 Link to comment Share on other sites More sharing options...
SIERRA Posted May 10, 2018 Author Share Posted May 10, 2018 Hi, Thanks for your reply The field that you referred inside 'Setting' was empty. Then I updated with the value 'cn' as referred in attached screen shot. Now in view->New window/Tab->Chinese this is displaying the Chinese version that I created. And in view->New window/Tab-> English this is displaying the English version. Actually I would like to have the front of the site alone in both 'English' and 'Chinese' version. I have attached the steps what I am doing in my first post (pw-reference-09052018.docx). Could you please confirm what I am doing is the correct way. Thanks ref-24042018.docx Link to comment Share on other sites More sharing options...
SIERRA Posted May 10, 2018 Author Share Posted May 10, 2018 My current setting is as in here Thanks Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 10, 2018 Share Posted May 10, 2018 44 minutes ago, SIERRA said: the front of the site alone in both 'English' and 'Chinese' version So you want the homepage to be displayed in both languages at the same time? Please refer to this article about multi-language fields. There are lot of examples that will guide you through the handling of multi-language fields/sites/setups. https://processwire.com/api/multi-language-support/multi-language-fields/ 44 minutes ago, SIERRA said: Could you please confirm what I am doing is the correct way. As far as I understand your goal you want to achieve and the settings I see it looks pretty well so far. Link to comment Share on other sites More sharing options...
SIERRA Posted May 10, 2018 Author Share Posted May 10, 2018 So you want the homepage to be displayed in both languages at the same time? - Yes I would like to have all pages of the website (the front end of the website alone not admin panel) in both 'English' and 'Chinese' with a language switcher provision. Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 10, 2018 Share Posted May 10, 2018 So not at the same time. The user has to decide/switch to its favourite language. To get this done please read the article I linked above. You may although want to create a new ProcessWire instance with the Multi-Language Profile. In that profile you will find almost everything you want and need. This will help you to understand how ProcessWire handles everything. Link to comment Share on other sites More sharing options...
SIERRA Posted May 10, 2018 Author Share Posted May 10, 2018 So not at the same time. The user has to decide/switch to its favourite language. -- Yes To get this done please read the article I linked above. You may although want to create a new ProcessWire instance with the Multi-Language Profile. In that profile you will find almost everything you want and need. -- Ok, will check on this. Thanks Link to comment Share on other sites More sharing options...
dragan Posted May 11, 2018 Share Posted May 11, 2018 On 5/10/2018 at 1:03 PM, SIERRA said: with a language switcher The relevant code is here: https://github.com/processwire/processwire/blob/master/site-languages/templates/_main.php#L65 In the same php file, make sure you also use the correct html lang attribute value, and in the <head> section the hreflang stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now