Has anyone used this to naturally sort a Name Field? https://www.drupal.org/project/name Unfortunately I'm not a programmer and don't know where to start to add this functionality.

Comments

troybthompson created an issue. See original summary.

generalredneck’s picture

troybthompson,

naw, noone that I know of has ever used this functionality to do that before. Currently if you are using the text field fuctionality... it looks specifically for the "text" type. Otherwise, when working with other properties on an entity it's looking for properties of the type "varchar".

Name is it's own "field"... I'd be curious to see what you are looking for in Natural sorting in a name field as the typical "book name" things doesn't apply to Family names. I'm not sure I've ever seen anyone named "The Kings" before. Could you elaborate on your usecase?

troybthompson’s picture

Mainly I was using natural sort to ignore punctuation like apostrophes in names. So names starting with A'g... would be sorted along with Ag... names rather than before the Aa... names. My other idea was to not use the module and create some sort of calculation field that stripped out special characters and use that for sorting, but I haven't had time to figure that out yet.

stevieb’s picture

or Family Names like Łakomy could be sorted as Lakomy or Štětina as Stetina

generalredneck’s picture

stevieb,

What you are describing is collation. By default your database table settings determines how those sort. Otherwise we are using something like iconv to do this.

We can explore this but I think that is a local specific naturalization and may be beyond the scope of what I'm trying to handle with this module

generalredneck’s picture

You know... rereading this months later... lets talk about having a collation transformation that can be added. Just keep in mind that it won't solve all the usecases in Alphabet nuances. English would would great, but we would need to look at the database layer (and probably other modules) to solve this for other languages.

generalredneck’s picture

Status: Active » Closed (outdated)