This is an analogue of {{langrev}} for script codes. Given a script name, it returns a script code. If a script name is not recognized, returns empty string.

Just like with {{langrev}}, the mapping is not injective; both {{langrev|Latin}} and {{langrev|Roman}} will return "Latn".

Warning: not all script names are recognised (yet). To add a script name, create a page "Template:scriptrev/name" containing only the script code as its contents. See Special:PrefixIndex/Template:scriptrev for a list of currently recognised names.