Old Spanish alphabetical order

Pyth, 14 13 bytes

Update: saw this got accepted and noticed a trivial 1 byte golf. Whoops.

:D"ll|ch|."1Q

Try it online. Test suite.

For each word, find all non-overlapping matches for the regex ll|ch|.. This splits the word into the "letters". Then, just sort the words by the splitted lists.


PowerShell, 46 44 51 50 bytes

$args|sort @{e={$_-replace'(?=ch|ll)(.).','$1Α'}}

The Α character is the Greek letter alpha which in comes after all Latin letters in PowerShell's default sort order (at least on my machine, I'm not sure if it's different in other locales). It's counted as 2 bytes in UTF8 encoding.

Example usage, assuming this string is saved in a file named es-sort.ps1:

> es-sort.ps1 'lzego' 'luego' 'llama'

luego
lzego
llama

Mathematica, 81 bytes

StringReplace[Sort@StringReplace[#,"ch"->"cZ","ll"->"lZ"],"cZ"->"ch","lZ"->"ll"]&

Same approach as TimmyD's answer.