If you ever had to deal with morphology in English, you probably found one or two libraries to help you out. But if you had to do that for Russian, than I’m sure you are missing a few hairs, and the ones that you still have are grayer than they used to be. I’ve got some good news for you though, now there is Morphos (GitHub repository).
Morphos is a morphological solution written completely in the PHP language. Supports Russian and English. Provides classes to decline First/Middle/Last names/nouns and generate cardinal numerals.
Just look at this beauty!
/* Will produce something like
string(15) "об Иване"
Just this alone can make user interfaces and emails so much better. But there is more to it than that.
I’ve been catching up with the CakePHP roadmap. One of the tickets for the next release (CakePHP 3.3.10, scheduled for tomorrow), is this ticket, relating to the breadcrumbs navigation.
When building applications with CakePHP, you have a couple of easy ways to generate breadcrumbs for the easier user navigation. One, is to use HTML Helper, which provides a quick and simple way. The other, is to use a feature rich Breadcrumbs Helper, available since CakePHP version 3.3.6 (but not mentioned in the release notes).
Digging further down into templates, and best practices for user navigation, and different ways of styling breadcrumbs (Smashing Magazine, Hongkiat, UI Patterns), I thought – wouldn’t it be nice to have breadcrumbs navigation built into a human brain?
I mean, how many times did you catch yourself in some dark corner of the Internet, trying to figure out how did you get there? If only humans had breadcrumbs navigation built into our brains, that would be so easy to trace back the steps. Browser history can, of course, help, but with so many open tabs and several things happening in parallel, a flat list of tabs is not much help.
Pascal Birchler of the WordPress blogs some interesting research he did in the area of handling preferred language and how different systems – ranging from browsers, wikis, and social networks to all kinds of content management systems – approach and solve the problem.
Drupal 8 has a rather powerful user interface text language detection mechanism. There is a per session, per user and per browser option in the detection settings. However, users can only choose one language, so they cannot say (in core at least) that they want German primarily and Spanish if German is not available. But the language selected by the user is part of the larger fallback system, so it may fall back further down to other options.
The Language fallback module allows defining one fallback for a language, while the Language Hierarchy module provides a GUI to change the language fallback system. It allows setting up language hierarchies where translations of a site’s content, settings and interface can fall back to parent language translations, without ever falling back to English. This module might be the most interesting one for our research.
Apart from the research itself, I think this is an interesting example of how complex some seemingly simple features are.
This made me chuckle a few times – “Artist attempts to create most frustrating products imaginable“. Some of them take a second or two to understand.
Kottke blog links to this Twitter thread with hilariously bad phone number forms used on the web, which started with this one:
User experience and web design horror stories …
I’ve linked to Unsplash before. It’s a collection of free high-resolution photos. This time however, I’m linking to their excellent 404 page design. Every time you hit a 404 page not found error, you see a short funny fail video. Every time the video is different. Funny!
OK, this is pure gold. First of all, this is probably the greatest title ever. “10 Things I Learned About UX By Being Drunk“. Secondly, this post links to The User Is Drunk website, which is a brilliant idea and … a business, apparently. Thirdly, it reiterates once again over the things that couldn’t be recommended strong enough:
- Don’t say too much
- Tell me who your site is for
- Solve the need, and tell me what it is
- Don’t copy paste
- Hide anything non-essential
- Make sure every link on your homepage works
- Not every site needs to be flashy
- Time on site is not the only metric
- Use web standards
- Stand out
Just a quick update on something that I wanted to do for quite a while now – I’ve joined the display of tags and categories. They are still separated in the back-end for me to manage the posts easier. I just figured out that for site visitors there’s no practical difference, and thus using two user interface elements where one can do the job is not ideal. The code snippet that helped me do that was borrowed (and slightly modified) from this Codex page. The only two change that I did were:
- Skip the General category (or All, as it’s labeled in this case), since all posts belong to it anyway.
- Skip post format taxonomy (as those are already encoded with post styling – colors and titles).
I’ve also thrown a copyright into the footer and a small welcome box to the sidebar, but those are just cosmetics.
Hover.css – collection of CSS3 powered hover effects