Skip to content
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

Wrong menu item sorting under Hungarian language #26418

Open
csbalazs opened this issue Sep 26, 2019 · 8 comments
Open

Wrong menu item sorting under Hungarian language #26418

csbalazs opened this issue Sep 26, 2019 · 8 comments

Comments

@csbalazs
Copy link

Wrong menu item sorting under Hungarian langauge in Component menu in Joomla! admin.
In the Hungarian alphabet, the second letter is the "á" ("Á"), but the "Átirányítás" (Redirect) component almost the last in the menu.
screen shot 2019-09-26 at 14 32 38

@brianteeman
Copy link
Contributor

Unfortunately this is the case with all languages that have extended accented characters. @ot2sen and myself looked at this before and if I recall correctly it requires a change in the mysql database collation for each specific language.

@brianteeman
Copy link
Contributor

see #11609

@csbalazs
Copy link
Author

Hungarian alphabetical rule: Short (a, e, i, o, ö, u, ü) and long (á, é, í, ó, ő, ú, ű) vowels appear anywhere in words, they are always considered equal. So, for the letters "a" and "á", neither the letter "a" nor the letter "á" takes precedence, but the order of the letters following them.

For example, articles ordering by title looks good in admin:
Jegyzet 2019-09-26 222703

@SharkyKZ
Copy link
Contributor

We do sort admin menu items in PHP here:

$item->components = ArrayHelper::sortObjects($item->components, 'text', 1, false, true);

We could do it the same way we sort components in com_config:

$result[$component] = JApplicationHelper::stringURLSafe(JText::_($component)) . '_' . $component;

But it's not completely accurate either.

@brianteeman
Copy link
Contributor

Interesting - ArrayHelper::sortObjects supports an option locale parameter

* @param mixed $locale Boolean or array of booleans to let sort occur using the locale language or not

@SharkyKZ
Copy link
Contributor

I tried that once but it doesn't work on Windows, apparently. See #22542.

@brianteeman
Copy link
Contributor

Where we you getting the locale from,? The language file or the OS. it should be the language file.

@SharkyKZ
Copy link
Contributor

The language file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants