suntrop Posted September 23, 2015 Share Posted September 23, 2015 I've got a website with multiple languages and two of them are Chinese and Russian. Since both use characters nobody of us can read we have some big problems to insert links from the editor. If we want to pick a page we can't see what page to select. Is there any way to display the page titles in another language? How do you select a page from a language you can't read? Thanks! Link to comment Share on other sites More sharing options...
LostKobrakai Posted September 23, 2015 Share Posted September 23, 2015 By default everything in processwire is displayed in the language of the user. So if you change your user to use any of the readable languages it should be used for page select fields as well. Link to comment Share on other sites More sharing options...
suntrop Posted September 23, 2015 Author Share Posted September 23, 2015 Well, not everything I am not talking about UI or ProcessWire phrases. I am talking about the text editor and on how to insert links/select pages. Those titles depends on the language you are editing and do not change with your user profile settings. I am wondering if nobody else came across this I have about 70 links per language and no idea how to insert them. I am afraid the only way is to go to a language I can read, change from the front-end the language and copy paste the URL. Link to comment Share on other sites More sharing options...
LostKobrakai Posted September 23, 2015 Share Posted September 23, 2015 Well, that's certainly not great and not the logic I'd expect. I think in this case really the user-language should be used for the page list instead of the field language. You can change the behavior by changing ProcessPageEditLink.module the js config in init() to the following: $this->config->js('ProcessPageEditLink', array( 'selectStartLabel' => $this->startLabel, 'langID' => ($user->language ? (int) $user->language : 0), // Change this line 'pageID' => $id, 'pageUrl' => $this->page->url, 'pageName' => $this->page->name, 'rootParentUrl' => $this->page->rootParent->url, 'slashUrls' => $this->page->template->slashUrls, 'urlType' => $this->urlType, 'extLinkRel' => $this->extLinkRel, 'extLinkTarget' => $this->extLinkTarget, 'extLinkClass' => $this->extLinkClass, )); Link to comment Share on other sites More sharing options...
suntrop Posted September 23, 2015 Author Share Posted September 23, 2015 Thank you. This changes the title – but it also changes the URL. Thus I always will get the link to my default language. Link to comment Share on other sites More sharing options...
LostKobrakai Posted September 23, 2015 Share Posted September 23, 2015 Now I understand why it was that way. I think you'd need Ryan to implement a "two" languages strategy into ProcessPageList, so it's using labels in the user's language and urls in the fields language. Currently the module just overwrites the users language. Link to comment Share on other sites More sharing options...
suntrop Posted September 24, 2015 Author Share Posted September 24, 2015 Ok, thanks for your effort!! 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