There is no reasonable way to do this well. A universal variety does not exist for all languages, even within the same alphabet. Different languages (cultures, mainly) have developed different sorting rules for how words are sorted.
The only way to do this always, in my opinion, is to use a simple old sort by name (for example, in Java, String.compareTo).
You can come up with some heuristics, depending on what your data represents. You can group strings based on guesses about the alphabet and language, and then use local sorting for each group. But you have to make it hard (the code itself), I think, because you will guess differently depending on the terms (for example, "mar" - an English verb or a Spanish noun?). It can be assumed that as a result of unpredictable “errors,” you will get a worse result than the naive Unicode sequence number.
As with anything else, it depends on how much you can afford to enter the solution and what kind of performance you need.
This sentence is not the answer you are looking for: if there is any way to identify the locale when storing the lines for the first time, you should do this and write it as part of the string metadata. Then you will not have this problem.
source share