-
Notifications
You must be signed in to change notification settings - Fork 10
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
Multilingual page pickers #22
Comments
Well I found a workaround that could work, setting the "lang" GET parameter with a hook: $this->addHookBefore('ProcessPageList::execute', function(HookEvent $event) {
$this->input->get['lang'] = 1020;
}); Of course 1020 needs to be dynamic, which could be achieved by the picker (select), eg. placing a cookie. Plus the "Select page" field would need to be reloaded as well. This change would also make the labels to be translated to the target language ("Choose"), and of course the page titles that appear. The latter would make it hard for English editors to pick the right page if they see the page titles in Chinese or Russian, for example. Perhaps it were more handy (and safe) to leave the user language as is, and use these buttons (EN, DE, ES, etc) to "convert" paths to the corresponding language paths? Eg. "/contact-us" to "/de/kontakt-uns"? This could be more easily achieved using a small ajax call I guess. |
From UI point of view it would be better to add the DE, ES, etc buttons on each row next to Choose. I'm not sure if this could achieved easily, perhaps this should be in the core instead. |
I'm really not sure what the best interface would be? I like your ideas as well. I wonder how we can get more user interface ideas from the community? Maybe mention this on the AdminOnSteriods forum post? I tried looking at how other CMS implement something like this, but I couldn't find any good implementations. I really just wanted to do a brain dump and get these ideas out of my head. I didn't want to get busy and just forget about them. I also wanted to give you another possible feature to add for v100! Maybe @ryancramerdesign could look at these ideas as well? |
I think the best would be to create a forum topic about this, and adding a feature request for PW GitHub to make Ryan know about it. The main issue is to determine what the user would need - would he need to see page titles in his language (set in his Profile), or localized titles. I would say that the former sounds more logical but maybe others have different views. |
Just had an idea. I'm not sure it is possible, but how about adding a client-side language picker to each place these pickers are shown?
Maybe a dropdown select field for choosing the EN, ES, DE just like you did in the AdminOnSteriods configuration options?
Selecting a different language would only show/select pages in that specific language. The autocomplete page input, page tree picker, select child page picker, and select file picker would only show/select pages in that language.
I was thinking that after choosing a different language it would perform an ajax request to replace the field's contents.
This would allow a user to pick or browse pages in a language that is different from the user's language.
example:fieldtype-assisted-url
Here are some other examples where these pickers appear.
example: ckeditor-page-linker
example: parent page selector
example: AdminOnSteriods NavItems page picker
The text was updated successfully, but these errors were encountered: