Jump to content

Change order of languages


vknt
 Share

Recommended Posts

I'm in the progress of creating a mulilingual site. Done this before, no problem.

I've created 3 languages, however the order in which they have to be shown is incorrect. It should be Dutch, French and English instead of Dutch, English and French.

Is there a way to change this order of apperance?

Thanks in advance.

Link to comment
Share on other sites

And another question: tried to delete the 2 languages that I added, and now I'm completely locked out of the CMS with this error code:

Recoverable Fatal Error Argument 1 passed to LanguagesPageFieldValue::__construct() must be an array, string given, called in /home/brightpark/public_html/wire/modules/LanguageSupport/LanguageSupportFields.module on line 296 and defined (line 33 of /home/brightpark/public_html/wire/modules/LanguageSupport/LanguagesPageFieldValue.php)

This error message was shown because you are logged in as a Superuser. Error has been logged.

Any way that I can fix this?

Does this mean, I can delete or add languages on the fly?

PS I have a database backup..

Link to comment
Share on other sites

Is there a way to change this order of apperance?

You should be able to drag them to the order you want. They are in the admin page tree as children of /processwire/setup/languages/. They may be set for alpha sorting, in which case you'll want to change to manual sorting.

And another question: tried to delete the 2 languages that I added, and now I'm completely locked out of the CMS with this error code:

I think you must be running an older version of 2.2 because this issue was fixed 6 months ago. Update the version of your source and it should resolve the issue.

Link to comment
Share on other sites

Thankyou Ryan. Updating to the latest version got me back.

As for the order of the languages, changing the order in /setup/languages does change the order of the multifields. and when going to setup/languages/ it's also stil in the order they have been created.

To change to order I have to delete both languages and create them in the correct order. When I have to switch languages when there's already content filled in, this might be a problem.

But I realize this is an uncommon problem. Good to know that it works like this..

Link to comment
Share on other sites

Thanks, I think I understand what you mean and was able to implement a fix. Since it has potential to affect other things, I've put it in the dev branch for testing. If you want to try it out, replace your /wire/core/PagesType.php file with the one from the dev branch:

https://github.com/ryancramerdesign/ProcessWire/commit/f2b63ec23cf8bb817eacf2c81434c354fc651dcd

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...