Difference between revisions 18626589 and 18626590 on frwiktionarylocal export = {} -- Detect the script based on the first alphabetical characters of a string function export.detect_script(text, lang) if type(lang) == "string" then lang = require("Module:languages").getLanguageByCode(lang) end⏎ ⏎ local m_scripts = mw.loadData("Module:scripts/tempdata") local scripts = mw.loadData("Module:languages/alldata")[lang:getCode()].scripts local scFix = false -- Does this language have more than one script? -- If not, we can bypass the detection for a speed bonus. -- But always do the detection if the script is "None" or "Zyyy" if not (scripts[2] or scripts[1] == "None" or scripts[1] == "Zyyy") then (contracted; show full) i = i + 1 cat = args[i] end return export.format_categories(categories, lang, sort_key) end return export All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://fr.wiktionary.org/w/index.php?diff=prev&oldid=18626590.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|