[[Module:scripts]]

Fragment of a discussion from User talk:Rua
Jump to navigation Jump to search

How do you mean?

CodeCat14:42, 21 July 2013

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.

Z14:47, 21 July 2013

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...

CodeCat14:49, 21 July 2013

I actually meant we should merge Module:scripts to Module:languages, the data in Module:scripts is relatively small.

Z14:57, 21 July 2013

So you want people to use "lang=Latn"? Huh?

CodeCat15:10, 21 July 2013

The parameter's name can be changed.

Z15:24, 21 July 2013

That's not what I mean. If we add scripts to Module:languages, then a template like {{term}} would accept "Latn" as a valid language.

CodeCat15:58, 21 July 2013

I see.

Z16:04, 21 July 2013