Lexicographically sorting Japanese-language strings

SortByAlphabetRule[words_List,order_]:=Block[{rule},rule=Association[Thread[order->Range[Length[order]]]];
words[[Ordering[PadRight[Characters[words]/.rule]]]]]

ClearAll[mengAlphabeticOrder]
mengAlphabeticOrder[a_String?(StringLength[#]===1&),b_String?(StringLength[#]===1&),orderedAlphabet_]:=Switch[
Position[orderedAlphabet,a,1][[1,1]]-Position[orderedAlphabet,b,1][[1,1]],
0,0,
_?(#<0&),1,
_?(#>0&),-1
];

mengAlphabeticOrder[a_:{__String?(StringLength[#]===1&)},b_:{_String?(StringLength[#]===1&)},orderedAlphabet_]:=Replace[
MapThread[mengAlphabeticOrder[##,orderedAlphabet]&,{a,b}],
{
{0..}-> 0,
{0..,-1,___}:> -1,
{0..,1,___}:> 1,
{d_,___}:> d
}
];

ClearAll[lexicographicSort]
lexicographicSort[s:{___String},orderedAlphabet_:ordering["ja","Iroha"]]:=Module[
{
lengths=StringLength/@s,
pad=orderedAlphabet[[1]],
ord
},
ord=Ordering[
PadRight[Characters/@s,{Length[s],Max[lengths]},pad],
Length[s],
mengAlphabeticOrder[#1,#2,orderedAlphabet]&
];
MapThread[StringJoin@Take@#&,{Characters[s[[ord]]],lengths[[ord]]}]
]

orderedAlphabet["ja","Iroha"] = {"イ", "ロ", "ハ", "ニ", "ホ", "ヘ", "ト", "チ", "リ", "ヌ","ル", "ヲ", "ワ", "カ", "ヨ", "タ", "レ", "ソ", "ツ", "ネ",  "ナ", "ラ", "ム", "ウ", "ヰ", "ノ", "オ", "ク", "ヤ", "マ","ケ", "フ", "コ", "エ", "テ", "ア", "サ", "キ", "ユ", "メ","ミ", "シ", "ヱ", "ヒ", "モ", "セ", "ス", "ン"}

orderedAlphabet["ja"]={"ア","イ","ウ","エ","オ","カ","キ","ク","ケ","コ","サ","シ","ス","セ","ソ","タ","チ","ツ","テ","ト","ナ","ニ","ヌ","ネ","ノ","ハ","ヒ","フ","ヘ","ホ","マ","ミ","ム","メ","モ","ヤ","ユ","ヨ","ラ","リ","ル","レ","ロ","ワ","ヲ","ン"}

names={"シムラ","マツモト","イト","サカタ","タカサワ","ハヤシ","アサヌマ","イシカワ","テラソマ","フクヤマ"}

mengTiming[lexicographicSort[names,ordering["ja","Iroha"]]]
lexicographicSort[names,ordering["ja","Iroha"]]==={"イト","イシカワ","ハヤシ","タカサワ","マツモト","フクヤマ","テラソマ","アサヌマ","サカタ","シムラ"}

Sort[names,AlphabeticOrder[LinguisticAssistant]]

Sort[{"中国","海洋","之乎者也","是"},AlphabeticOrder[LinguisticAssistant]]

AlphabeticSort[iroha,"KatakanaIroha"]

iroha={"イ","ロ","ハ","ニ","ホ","ヘ","ト","チ","リ","ヌ","ル","ヲ","ワ","カ","ヨ","タ","レ","ソ","ツ","ネ","ナ","ラ","ム","ウ","ヰ","ノ","オ","ク","ヤ","マ","ケ","フ","コ","エ","テ","ア","サ","キ","ユ","メ","ミ","シ","ヱ","ヒ","モ","セ","ス","ン"};

AlphabeticSort[iroha,"KatakanaIroha"]===iroha

AlphabeticSort[iroha]===iroha

StringJoin["&",Riffle[iroha,"<"]]

System`AlphabeticOrderDump`alphabetToLocaleTailoring["KatakanaIroha"]={"ja",StringJoin["&",Riffle[iroha,"<"]]};

AlphabeticSort[iroha,"KatakanaIroha"]===iroha