[[Module:scripts]]
Fragment of a discussion from User talk:Rua
We can detect if the input is the code of a language or a script, from its first letter. But by merging Module:scripts to Module:languages, lookup_language doesn't need to know that, so we can use lookup_language for looking up both languages and scripts.
Z
I think we should rather focus on speed. lookup_language is a very heavily used function, so we should try to keep it fast. String pattern/search operations would slow it down. I know that it can be useful to make "smart" functions, but it's easy to overdo it...
I actually meant we should merge Module:scripts to Module:languages, the data in Module:scripts is relatively small.
Z