CINXE.COM
Module:Convert - វិគីភីឌា
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="km" dir="ltr"> <head> <meta charset="UTF-8"> <title>Module:Convert - វិគីភីឌា</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )kmwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":[".",","],"wgDigitTransformTable":["0\t1\t2\t3\t4\t5\t6\t7\t8\t9", "០\t១\t២\t៣\t៤\t៥\t៦\t៧\t៨\t៩"],"wgDefaultDateFormat":"km","wgMonthNames":["","ខែមករា","ខែកុម្ភៈ","ខែមីនា","ខែមេសា","ខែឧសភា","ខែមិថុនា","ខែកក្កដា","ខែសីហា","ខែកញ្ញា","ខែតុលា","ខែវិច្ឆិកា","ខែធ្នូ"],"wgRequestId":"f8e9164b-4472-4391-995e-b5a9b454ffb8","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Module:Convert","wgTitle":"Convert","wgCurRevisionId":145339,"wgRevisionId":145339,"wgArticleId":24061,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"km","wgPageContentLanguage":"km","wgPageContentModel":"Scribunto","wgRelevantPageName":"Module:Convert","wgRelevantArticleId":24061,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true, "wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":100000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q14033926","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser": false,"wgSiteNoticeId":"2.0"};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.tablesorter.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready","ext.dismissableSiteNotice.styles":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","jquery.tablesorter","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns", "wikibase.client.vector-2022","ext.checkUser.clientHints","ext.dismissableSiteNotice"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=km&modules=ext.dismissableSiteNotice.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cjquery.tablesorter.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=km&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=km&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.6"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Module:Convert - វិគីភីឌា"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//km.m.wikipedia.org/wiki/Module:Convert"> <link rel="alternate" type="application/x-wiki" title="កែប្រែ" href="/w/index.php?title=Module:Convert&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="វិគីភីឌា (km)"> <link rel="EditURI" type="application/rsd+xml" href="//km.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://km.wikipedia.org/wiki/Module:Convert"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.km"> <link rel="alternate" type="application/atom+xml" title="Atom Feed នៃ វិគីភីឌា" href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%94%E1%9F%86%E1%9E%9B%E1%9E%B6%E1%9E%9F%E1%9F%8B%E1%9E%94%E1%9F%92%E1%9E%8A%E1%9E%BC%E1%9E%9A%E1%9E%90%E1%9F%92%E1%9E%98%E1%9E%B8%E1%9F%97&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject mw-editable page-Module_Convert rootpage-Module_Convert skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="បញ្ជីដើម" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">បញ្ជីដើម</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">បញ្ជីដើម</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">ប្ដូរទីតាំងទៅរបារចំហៀង</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">លាក់</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> ការណែនាំ </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%8A%E1%9E%BE%E1%9E%98" title="ចូលមើលទំព័រដើម [z]" accesskey="z"><span>ទំព័រដើម</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%94%E1%9F%86%E1%9E%9B%E1%9E%B6%E1%9E%9F%E1%9F%8B%E1%9E%94%E1%9F%92%E1%9E%8A%E1%9E%BC%E1%9E%9A%E1%9E%90%E1%9F%92%E1%9E%98%E1%9E%B8%E1%9F%97" title="បញ្ជីបន្លាស់ប្ដូរថ្មីៗនៅក្នុងវិគីនេះ [r]" accesskey="r"><span>បន្លាស់ប្ដូរថ្មីៗ</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/%E1%9E%87%E1%9F%86%E1%9E%93%E1%9E%BD%E1%9E%99:%E1%9E%98%E1%9E%B6%E1%9E%8F%E1%9E%B7%E1%9E%80%E1%9E%B6" title="ជំនួយបន្ថែម"><span>ជំនួយ</span></a></li><li id="n-newpages" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%90%E1%9F%92%E1%9E%98%E1%9E%B8%E1%9F%97"><span>ទំព័រថ្មីៗ</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%85%E1%9F%83%E1%9E%8A%E1%9E%93%E1%9F%92%E1%9E%99" title="ផ្ទុកទំព័រចៃដន្យមួយទំព័រ [x]" accesskey="x"><span>ទំព័រចៃដន្យ</span></a></li> </ul> </div> </div> <div id="p-community" class="vector-menu mw-portlet mw-portlet-community" > <div class="vector-menu-heading"> សហគមន៍ </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-admin" class="mw-list-item"><a href="/wiki/%E1%9E%9C%E1%9E%B7%E1%9E%82%E1%9E%B8%E1%9E%97%E1%9E%B8%E1%9E%8C%E1%9E%B6:%E1%9E%9F%E1%9E%BB%E1%9F%86%E1%9E%92%E1%9F%92%E1%9E%9C%E1%9E%BE%E1%9E%87%E1%9E%B6%E2%80%8B%E1%9E%A2%E1%9F%92%E1%9E%93%E1%9E%80%E2%80%8B%E1%9E%82%E1%9F%92%E1%9E%9A%E1%9E%94%E1%9F%8B%E1%9E%82%E1%9F%92%E1%9E%9A%E1%9E%84"><span>សុំធ្វើជាអ្នកអភិបាល</span></a></li><li id="n-rename" class="mw-list-item"><a href="/wiki/%E1%9E%9C%E1%9E%B7%E1%9E%82%E1%9E%B8%E1%9E%97%E1%9E%B8%E1%9E%8C%E1%9E%B6:%E1%9E%9F%E1%9E%BB%E1%9F%86%E1%9E%94%E1%9F%92%E1%9E%8F%E1%9E%BC%E1%9E%9A%E1%9E%A2%E1%9E%8F%E1%9F%92%E1%9E%8F%E1%9E%93%E1%9E%B6%E1%9E%98"><span>សុំប្តូរអត្តនាម</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/%E1%9E%9C%E1%9E%B7%E1%9E%82%E1%9E%B8%E1%9E%97%E1%9E%B8%E1%9E%8C%E1%9E%B6:%E2%80%8B%E1%9E%95%E1%9E%8F%E1%9E%90%E1%9E%9B%E1%9E%9F%E1%9E%A0%E1%9E%82%E1%9E%98%E1%9E%93%E1%9F%8D" title="អំពីគម្រោង អ្វីដែលអ្នកអាចធ្វើបាន និងកន្លែងស្វែងរកព័ត៌មាន"><span>ផតថលសហគមន៍</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%8A%E1%9E%BE%E1%9E%98" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="វិគីភីឌា" src="/static/images/mobile/copyright/wikipedia-wordmark-km.svg" style="width: 5.0625em; height: 2em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikipedia-tagline-km.svg" width="81" height="14" style="width: 5.0625em; height: 0.875em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%9F%E1%9F%92%E1%9E%9C%E1%9F%82%E1%9E%84%E1%9E%9A%E1%9E%80" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="ស្វែងរកក្នុងវិគីភីឌា [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>ស្វែងរក</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="ស្វែងរកក្នុងវិគីភីឌា" aria-label="ស្វែងរកក្នុងវិគីភីឌា" autocapitalize="sentences" title="ស្វែងរកក្នុងវិគីភីឌា [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="ពិសេស:ស្វែងរក"> </div> <button class="cdx-button cdx-search-input__end-button">ស្វែងរក</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="ឧបករណ៍ផ្ទាល់ខ្លួន"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=km.wikipedia.org&uselang=km" class=""><span>បរិច្ចាគ</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%94%E1%9E%84%E1%9F%92%E1%9E%80%E1%9E%BE%E1%9E%8F%E1%9E%82%E1%9E%8E%E1%9E%93%E1%9E%B8&returnto=Module%3AConvert" title="អ្នកត្រូវបានលើកទឹកចិត្តបង្កើតគណនីនិងកត់ឈ្មោះចូល។ ប៉ុន្តែនេះមិនមែនជាការបង្ខំទេ។" class=""><span>បង្កើតគណនី</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%80%E1%9E%8F%E1%9F%8B%E1%9E%88%E1%9F%92%E1%9E%98%E1%9F%84%E1%9F%87%E1%9E%85%E1%9E%BC%E1%9E%9B%E1%9E%9A%E1%9E%94%E1%9E%9F%E1%9F%8B%E1%9E%A2%E1%9F%92%E1%9E%93%E1%9E%80%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%BE%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%B6%E1%9E%9F%E1%9F%8B&returnto=Module%3AConvert" title="អ្នកត្រូវបានលើកទឹកចិត្តឱ្យកត់ឈ្មោះចូល។ ប៉ុន្តែនេះមិនមែនជាការបង្ខំទេ។ [o]" accesskey="o" class=""><span>កត់ឈ្មោះចូល</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="ជម្រើសផ្សេងទៀត" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="ឧបករណ៍ផ្ទាល់ខ្លួន" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">ឧបករណ៍ផ្ទាល់ខ្លួន</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="បញ្ជីសម្រាប់អ្នកប្រើប្រាស់" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=km.wikipedia.org&uselang=km"><span>បរិច្ចាគ</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%94%E1%9E%84%E1%9F%92%E1%9E%80%E1%9E%BE%E1%9E%8F%E1%9E%82%E1%9E%8E%E1%9E%93%E1%9E%B8&returnto=Module%3AConvert" title="អ្នកត្រូវបានលើកទឹកចិត្តបង្កើតគណនីនិងកត់ឈ្មោះចូល។ ប៉ុន្តែនេះមិនមែនជាការបង្ខំទេ។"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>បង្កើតគណនី</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%80%E1%9E%8F%E1%9F%8B%E1%9E%88%E1%9F%92%E1%9E%98%E1%9F%84%E1%9F%87%E1%9E%85%E1%9E%BC%E1%9E%9B%E1%9E%9A%E1%9E%94%E1%9E%9F%E1%9F%8B%E1%9E%A2%E1%9F%92%E1%9E%93%E1%9E%80%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%BE%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%B6%E1%9E%9F%E1%9F%8B&returnto=Module%3AConvert" title="អ្នកត្រូវបានលើកទឹកចិត្តឱ្យកត់ឈ្មោះចូល។ ប៉ុន្តែនេះមិនមែនជាការបង្ខំទេ។ [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>កត់ឈ្មោះចូល</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> ទំព័រសម្រាប់អ្នកកែសម្រួលដែលបានកត់ឈ្មោះចេញ <a href="/wiki/%E1%9E%87%E1%9F%86%E1%9E%93%E1%9E%BD%E1%9E%99:Introduction" aria-label="ស្វែងយល់បន្ថែមអំពីការកែសម្រួល"><span>ស្វែងយល់បន្ថែម</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%9A%E1%9E%BD%E1%9E%98%E1%9E%85%E1%9F%86%E1%9E%8E%E1%9F%82%E1%9E%80%E1%9E%9A%E1%9E%94%E1%9E%9F%E1%9F%8B%E1%9E%81%E1%9F%92%E1%9E%89%E1%9E%BB%E1%9F%86" title="បញ្ជីកំណែប្រែធ្វើឡើងពីអាសយដ្ឋាន IP នេះ [y]" accesskey="y"><span>ការរួមចំណែក</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%96%E1%9E%B7%E1%9E%97%E1%9E%B6%E1%9E%80%E1%9F%92%E1%9E%9F%E1%9E%B6%E1%9E%9A%E1%9E%94%E1%9E%9F%E1%9F%8B%E1%9E%81%E1%9F%92%E1%9E%89%E1%9E%BB%E1%9F%86" title="ការពិភាក្សាអំពីកំណែប្រែដែលធ្វើឡើងចេញពីអាសយដ្ឋាន IP នេះ [n]" accesskey="n"><span>ការពិភាក្សា</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><div id="mw-dismissablenotice-anonplace"></div><script>(function(){var node=document.getElementById("mw-dismissablenotice-anonplace");if(node){node.outerHTML="\u003Cdiv class=\"mw-dismissable-notice\"\u003E\u003Cdiv class=\"mw-dismissable-notice-close\"\u003E[\u003Ca tabindex=\"0\" role=\"button\"\u003Eលាក់\u003C/a\u003E]\u003C/div\u003E\u003Cdiv class=\"mw-dismissable-notice-body\"\u003E\u003C!-- CentralNotice --\u003E\u003Cdiv id=\"localNotice\" data-nosnippet=\"\"\u003E\u003Cdiv class=\"sitenotice\" lang=\"km\" dir=\"ltr\"\u003E\u003Cstyle data-mw-deduplicate=\"TemplateStyles:r296058\"\u003E.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}html.client-js body.skin-minerva .mw-parser-output .mbox-text-span{margin-left:23px!important}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}\u003C/style\u003E\u003Ctable class=\"plainlinks metadata ambox ambox-notice\" role=\"presentation\"\u003E\u003Ctbody\u003E\u003Ctr\u003E\u003Ctd class=\"mbox-image\"\u003E\u003Cdiv class=\"mbox-image-div\"\u003E\u003Cspan typeof=\"mw:File\"\u003E\u003Cspan\u003E\u003Cimg alt=\"\" src=\"//upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Information_icon4.svg/40px-Information_icon4.svg.png\" decoding=\"async\" width=\"40\" height=\"40\" class=\"mw-file-element\" srcset=\"//upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Information_icon4.svg/60px-Information_icon4.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Information_icon4.svg/80px-Information_icon4.svg.png 2x\" data-file-width=\"620\" data-file-height=\"620\" /\u003E\u003C/span\u003E\u003C/span\u003E\u003C/div\u003E\u003C/td\u003E\u003Ctd class=\"mbox-text\"\u003E\u003Cdiv class=\"mbox-text-span\"\u003Eក្រុមការងារយើង កំពុងស្វែងរកអ្នកស្ម័គ្រចិត្តដែលចង់ចូលរួមពង្រីកបណ្ដាញសមគមន៍វិគីភីឌាយើង។ \u003Cbr /\u003E\nសូមទំនាក់ទំនងមកកាន់ក្រុមការងារយើង តាមរយៈបណ្ដាញសង្គម social media ខាងក្រោម៖\u003C/div\u003E\u003C/td\u003E\u003C/tr\u003E\u003C/tbody\u003E\u003C/table\u003E\n\u003Cdiv class=\"center\"\u003E\n\u003Cp\u003E\u003Csmall\u003E\n\u003Ca rel=\"nofollow\" class=\"external text\" href=\"https://facebook.com/kmwp.fb\"\u003EFB Fan Page\u003C/a\u003E |\n\u003Ca rel=\"nofollow\" class=\"external text\" href=\"https://twitter.com/KhmerWikipedia\"\u003ETwitter\u003C/a\u003E |\n\u003Ca class=\"external text\" href=\"https://lists.wikimedia.org/mailman/listinfo/wikimedia-kh\"\u003EMailing List\u003C/a\u003E\u003C/small\u003E\n\u003C/p\u003E\n\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E";}}());</script></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="មាតិកា" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">មាតិកា</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">ប្ដូរទីតាំងទៅរបារចំហៀង</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">លាក់</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">ក្បាលទំព័រ</div> </a> </li> <li id="toc-Configuration" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Configuration"> <div class="vector-toc-text"> <span class="vector-toc-numb">១</span> <span>Configuration</span> </div> </a> <ul id="toc-Configuration-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="មាតិកា" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Module</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Convert</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in ១៤២ languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-142" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">១៤២ ភាសា</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ab mw-list-item"><a href="https://ab.wikipedia.org/wiki/%D0%90%D0%BC%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Амодуль:Convert – អាប់ខាហ៊្សាន" lang="ab" hreflang="ab" data-title="Амодуль:Convert" data-language-autonym="Аԥсшәа" data-language-local-name="អាប់ខាហ៊្សាន" class="interlanguage-link-target"><span>Аԥсшәа</span></a></li><li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/Module:Convert" title="Module:Convert – អាហ្វ្រិកាន" lang="af" hreflang="af" data-title="Module:Convert" data-language-autonym="Afrikaans" data-language-local-name="អាហ្វ្រិកាន" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-als mw-list-item"><a href="https://als.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – អាល្លឺម៉ង (ស្វីស)" lang="gsw" hreflang="gsw" data-title="Modul:Convert" data-language-autonym="Alemannisch" data-language-local-name="អាល្លឺម៉ង (ស្វីស)" class="interlanguage-link-target"><span>Alemannisch</span></a></li><li class="interlanguage-link interwiki-an mw-list-item"><a href="https://an.wikipedia.org/wiki/M%C3%B3dulo:Convertir" title="Módulo:Convertir – អារ៉ាហ្គោន" lang="an" hreflang="an" data-title="Módulo:Convertir" data-language-autonym="Aragonés" data-language-local-name="អារ៉ាហ្គោន" class="interlanguage-link-target"><span>Aragonés</span></a></li><li class="interlanguage-link interwiki-ang mw-list-item"><a href="https://ang.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Old English" lang="ang" hreflang="ang" data-title="Module:Convert" data-language-autonym="Ænglisc" data-language-local-name="Old English" class="interlanguage-link-target"><span>Ænglisc</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%88%D8%AD%D8%AF%D8%A9:Convert" title="وحدة:Convert – អារ៉ាប់" lang="ar" hreflang="ar" data-title="وحدة:Convert" data-language-autonym="العربية" data-language-local-name="អារ៉ាប់" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ary mw-list-item"><a href="https://ary.wikipedia.org/wiki/%D9%85%D9%88%D8%AF%D9%88%D9%84:Convert" title="مودول:Convert – Moroccan Arabic" lang="ary" hreflang="ary" data-title="مودول:Convert" data-language-autonym="الدارجة" data-language-local-name="Moroccan Arabic" class="interlanguage-link-target"><span>الدارجة</span></a></li><li class="interlanguage-link interwiki-arz mw-list-item"><a href="https://arz.wikipedia.org/wiki/%D9%88%D8%AD%D8%AF%D8%A9:Convert" title="وحدة:Convert – Egyptian Arabic" lang="arz" hreflang="arz" data-title="وحدة:Convert" data-language-autonym="مصرى" data-language-local-name="Egyptian Arabic" class="interlanguage-link-target"><span>مصرى</span></a></li><li class="interlanguage-link interwiki-as mw-list-item"><a href="https://as.wikipedia.org/wiki/Module:Convert" title="Module:Convert – អាសាមីស" lang="as" hreflang="as" data-title="Module:Convert" data-language-autonym="অসমীয়া" data-language-local-name="អាសាមីស" class="interlanguage-link-target"><span>অসমীয়া</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/M%C3%B3dulu:Convert" title="Módulu:Convert – អាស្ទូរី" lang="ast" hreflang="ast" data-title="Módulu:Convert" data-language-autonym="Asturianu" data-language-local-name="អាស្ទូរី" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-av mw-list-item"><a href="https://av.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – អាវ៉ារីក" lang="av" hreflang="av" data-title="Модуль:Convert" data-language-autonym="Авар" data-language-local-name="អាវ៉ារីក" class="interlanguage-link-target"><span>Авар</span></a></li><li class="interlanguage-link interwiki-ay mw-list-item"><a href="https://ay.wikipedia.org/wiki/M%C3%B3dulo:Convert" title="Módulo:Convert – អីម៉ារ៉ា" lang="ay" hreflang="ay" data-title="Módulo:Convert" data-language-autonym="Aymar aru" data-language-local-name="អីម៉ារ៉ា" class="interlanguage-link-target"><span>Aymar aru</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – អាស៊ែបៃហ្សង់" lang="az" hreflang="az" data-title="Modul:Convert" data-language-autonym="Azərbaycanca" data-language-local-name="អាស៊ែបៃហ្សង់" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-azb mw-list-item"><a href="https://azb.wikipedia.org/wiki/%D9%85%D8%A7%DA%98%D9%88%D9%84:Convert" title="ماژول:Convert – South Azerbaijani" lang="azb" hreflang="azb" data-title="ماژول:Convert" data-language-autonym="تۆرکجه" data-language-local-name="South Azerbaijani" class="interlanguage-link-target"><span>تۆرکجه</span></a></li><li class="interlanguage-link interwiki-ba mw-list-item"><a href="https://ba.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – បាស្គៀ" lang="ba" hreflang="ba" data-title="Модуль:Convert" data-language-autonym="Башҡортса" data-language-local-name="បាស្គៀ" class="interlanguage-link-target"><span>Башҡортса</span></a></li><li class="interlanguage-link interwiki-ban mw-list-item"><a href="https://ban.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – បាលី" lang="ban" hreflang="ban" data-title="Modul:Convert" data-language-autonym="Basa Bali" data-language-local-name="បាលី" class="interlanguage-link-target"><span>Basa Bali</span></a></li><li class="interlanguage-link interwiki-bat-smg mw-list-item"><a href="https://bat-smg.wikipedia.org/wiki/Module:Conversion" title="Module:Conversion – Samogitian" lang="sgs" hreflang="sgs" data-title="Module:Conversion" data-language-autonym="Žemaitėška" data-language-local-name="Samogitian" class="interlanguage-link-target"><span>Žemaitėška</span></a></li><li class="interlanguage-link interwiki-bcl mw-list-item"><a href="https://bcl.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Central Bikol" lang="bcl" hreflang="bcl" data-title="Module:Convert" data-language-autonym="Bikol Central" data-language-local-name="Central Bikol" class="interlanguage-link-target"><span>Bikol Central</span></a></li><li class="interlanguage-link interwiki-be mw-list-item"><a href="https://be.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – បេឡារុស" lang="be" hreflang="be" data-title="Модуль:Convert" data-language-autonym="Беларуская" data-language-local-name="បេឡារុស" class="interlanguage-link-target"><span>Беларуская</span></a></li><li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://be-tarask.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:%D0%9F%D0%B5%D1%80%D0%B0%D0%B2%D0%BE%D0%B4_%D0%B0%D0%B4%D0%B7%D1%96%D0%BD%D0%B0%D0%BA" title="Модуль:Перавод адзінак – Belarusian (Taraškievica orthography)" lang="be-tarask" hreflang="be-tarask" data-title="Модуль:Перавод адзінак" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="Belarusian (Taraškievica orthography)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Convert" title="Модул:Convert – ប៊ុលហ្ការី" lang="bg" hreflang="bg" data-title="Модул:Convert" data-language-autonym="Български" data-language-local-name="ប៊ុលហ្ការី" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bh mw-list-item"><a href="https://bh.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Bhojpuri" lang="bh" hreflang="bh" data-title="Module:Convert" data-language-autonym="भोजपुरी" data-language-local-name="Bhojpuri" class="interlanguage-link-target"><span>भोजपुरी</span></a></li><li class="interlanguage-link interwiki-bjn mw-list-item"><a href="https://bjn.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – Banjar" lang="bjn" hreflang="bjn" data-title="Modul:Convert" data-language-autonym="Banjar" data-language-local-name="Banjar" class="interlanguage-link-target"><span>Banjar</span></a></li><li class="interlanguage-link interwiki-blk mw-list-item"><a href="https://blk.wikipedia.org/wiki/%E1%80%99%E1%80%B1%E1%80%AC%E1%80%BA%E1%80%82%E1%80%BB%E1%80%B0%E1%80%B8:Convert" title="မော်ဂျူး:Convert – Pa'O" lang="blk" hreflang="blk" data-title="မော်ဂျူး:Convert" data-language-autonym="ပအိုဝ်ႏဘာႏသာႏ" data-language-local-name="Pa'O" class="interlanguage-link-target"><span>ပအိုဝ်ႏဘာႏသာႏ</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%AE%E0%A6%A1%E0%A6%BF%E0%A6%89%E0%A6%B2:Convert" title="মডিউল:Convert – បង់ក្លាដែស" lang="bn" hreflang="bn" data-title="মডিউল:Convert" data-language-autonym="বাংলা" data-language-local-name="បង់ក្លាដែស" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-bs mw-list-item"><a href="https://bs.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – បូស្នី" lang="bs" hreflang="bs" data-title="Modul:Convert" data-language-autonym="Bosanski" data-language-local-name="បូស្នី" class="interlanguage-link-target"><span>Bosanski</span></a></li><li class="interlanguage-link interwiki-bxr mw-list-item"><a href="https://bxr.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – Russia Buriat" lang="bxr" hreflang="bxr" data-title="Модуль:Convert" data-language-autonym="Буряад" data-language-local-name="Russia Buriat" class="interlanguage-link-target"><span>Буряад</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/M%C3%B2dul:Convert" title="Mòdul:Convert – កាតាឡាន" lang="ca" hreflang="ca" data-title="Mòdul:Convert" data-language-autonym="Català" data-language-local-name="កាតាឡាន" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cdo mw-list-item"><a href="https://cdo.wikipedia.org/wiki/%E6%A8%A1%E7%B5%84:Convert" title="模組:Convert – Mindong" lang="cdo" hreflang="cdo" data-title="模組:Convert" data-language-autonym="閩東語 / Mìng-dĕ̤ng-ngṳ̄" data-language-local-name="Mindong" class="interlanguage-link-target"><span>閩東語 / Mìng-dĕ̤ng-ngṳ̄</span></a></li><li class="interlanguage-link interwiki-ceb mw-list-item"><a href="https://ceb.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ស៊ីប៊ូអាណូ" lang="ceb" hreflang="ceb" data-title="Module:Convert" data-language-autonym="Cebuano" data-language-local-name="ស៊ីប៊ូអាណូ" class="interlanguage-link-target"><span>Cebuano</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D9%85%DB%86%D8%AF%DB%8C%D9%88%D9%88%D9%84:Convert" title="مۆدیوول:Convert – ឃើដភាគកណ្តាល" lang="ckb" hreflang="ckb" data-title="مۆدیوول:Convert" data-language-autonym="کوردی" data-language-local-name="ឃើដភាគកណ្តាល" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ឆែក" lang="cs" hreflang="cs" data-title="Modul:Convert" data-language-autonym="Čeština" data-language-local-name="ឆែក" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-cv mw-list-item"><a href="https://cv.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – ឈូវ៉ាស" lang="cv" hreflang="cv" data-title="Модуль:Convert" data-language-autonym="Чӑвашла" data-language-local-name="ឈូវ៉ាស" class="interlanguage-link-target"><span>Чӑвашла</span></a></li><li class="interlanguage-link interwiki-cy mw-list-item"><a href="https://cy.wikipedia.org/wiki/Modiwl:Convert" title="Modiwl:Convert – វេល" lang="cy" hreflang="cy" data-title="Modiwl:Convert" data-language-autonym="Cymraeg" data-language-local-name="វេល" class="interlanguage-link-target"><span>Cymraeg</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ដាណឺម៉ាក" lang="da" hreflang="da" data-title="Modul:Convert" data-language-autonym="Dansk" data-language-local-name="ដាណឺម៉ាក" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – អាល្លឺម៉ង់" lang="de" hreflang="de" data-title="Modul:Convert" data-language-autonym="Deutsch" data-language-local-name="អាល្លឺម៉ង់" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-din mw-list-item"><a href="https://din.wikipedia.org/wiki/Muk%C3%A4%C3%A4c%C3%ABt%C3%B6k:Convert" title="Mukääcëtök:Convert – Dinka" lang="din" hreflang="din" data-title="Mukääcëtök:Convert" data-language-autonym="Thuɔŋjäŋ" data-language-local-name="Dinka" class="interlanguage-link-target"><span>Thuɔŋjäŋ</span></a></li><li class="interlanguage-link interwiki-diq mw-list-item"><a href="https://diq.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – Zazaki" lang="diq" hreflang="diq" data-title="Modul:Convert" data-language-autonym="Zazaki" data-language-local-name="Zazaki" class="interlanguage-link-target"><span>Zazaki</span></a></li><li class="interlanguage-link interwiki-dv mw-list-item"><a href="https://dv.wikipedia.org/wiki/%DE%89%DE%AE%DE%91%DE%A8%DE%87%DE%AA%DE%8D%DE%B0:Convert" title="މޮޑިއުލް:Convert – ទេវីហ៊ី" lang="dv" hreflang="dv" data-title="މޮޑިއުލް:Convert" data-language-autonym="ދިވެހިބަސް" data-language-local-name="ទេវីហ៊ី" class="interlanguage-link-target"><span>ދިވެހިބަސް</span></a></li><li class="interlanguage-link interwiki-el mw-list-item"><a href="https://el.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ក្រិក" lang="el" hreflang="el" data-title="Module:Convert" data-language-autonym="Ελληνικά" data-language-local-name="ក្រិក" class="interlanguage-link-target"><span>Ελληνικά</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Module:Convert" title="Module:Convert – អង់គ្លេស" lang="en" hreflang="en" data-title="Module:Convert" data-language-autonym="English" data-language-local-name="អង់គ្លេស" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/M%C3%B3dulo:Convertir" title="Módulo:Convertir – អេស្ប៉ាញ" lang="es" hreflang="es" data-title="Módulo:Convertir" data-language-autonym="Español" data-language-local-name="អេស្ប៉ាញ" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Modulu:Convert" title="Modulu:Convert – បាសខ៍" lang="eu" hreflang="eu" data-title="Modulu:Convert" data-language-autonym="Euskara" data-language-local-name="បាសខ៍" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%BE%D9%88%D8%AF%D9%85%D8%A7%D9%86:Convert" title="پودمان:Convert – ភឺសៀន" lang="fa" hreflang="fa" data-title="پودمان:Convert" data-language-autonym="فارسی" data-language-local-name="ភឺសៀន" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Moduuli:Convert" title="Moduuli:Convert – ហ្វាំងឡង់" lang="fi" hreflang="fi" data-title="Moduuli:Convert" data-language-autonym="Suomi" data-language-local-name="ហ្វាំងឡង់" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fj mw-list-item"><a href="https://fj.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ហ៊្វីជី" lang="fj" hreflang="fj" data-title="Module:Convert" data-language-autonym="Na Vosa Vakaviti" data-language-local-name="ហ៊្វីជី" class="interlanguage-link-target"><span>Na Vosa Vakaviti</span></a></li><li class="interlanguage-link interwiki-fo mw-list-item"><a href="https://fo.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ហ្វារូស" lang="fo" hreflang="fo" data-title="Module:Convert" data-language-autonym="Føroyskt" data-language-local-name="ហ្វារូស" class="interlanguage-link-target"><span>Føroyskt</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Module:Convert" title="Module:Convert – បារាំង" lang="fr" hreflang="fr" data-title="Module:Convert" data-language-autonym="Français" data-language-local-name="បារាំង" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gan mw-list-item"><a href="https://gan.wikipedia.org/wiki/%E6%A8%A1%E7%B5%84:Convert" title="模組:Convert – Gan" lang="gan" hreflang="gan" data-title="模組:Convert" data-language-autonym="贛語" data-language-local-name="Gan" class="interlanguage-link-target"><span>贛語</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/M%C3%B3dulo:Convert" title="Módulo:Convert – ហ្កាលីស្យាន" lang="gl" hreflang="gl" data-title="Módulo:Convert" data-language-autonym="Galego" data-language-local-name="ហ្កាលីស្យាន" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-glk mw-list-item"><a href="https://glk.wikipedia.org/wiki/%D9%85%D8%A7%D8%AC%DB%8A%D9%84:Convert" title="ماجۊل:Convert – Gilaki" lang="glk" hreflang="glk" data-title="ماجۊل:Convert" data-language-autonym="گیلکی" data-language-local-name="Gilaki" class="interlanguage-link-target"><span>گیلکی</span></a></li><li class="interlanguage-link interwiki-gom mw-list-item"><a href="https://gom.wikipedia.org/wiki/%E0%A4%8F%E0%A4%95%E0%A4%95:Convert" title="एकक:Convert – Goan Konkani" lang="gom" hreflang="gom" data-title="एकक:Convert" data-language-autonym="गोंयची कोंकणी / Gõychi Konknni" data-language-local-name="Goan Konkani" class="interlanguage-link-target"><span>गोंयची कोंकणी / Gõychi Konknni</span></a></li><li class="interlanguage-link interwiki-gu mw-list-item"><a href="https://gu.wikipedia.org/wiki/%E0%AA%B5%E0%AA%BF%E0%AA%AD%E0%AA%BE%E0%AA%97:Convert" title="વિભાગ:Convert – ហ្គុយ៉ារ៉ាទី" lang="gu" hreflang="gu" data-title="વિભાગ:Convert" data-language-autonym="ગુજરાતી" data-language-local-name="ហ្គុយ៉ារ៉ាទី" class="interlanguage-link-target"><span>ગુજરાતી</span></a></li><li class="interlanguage-link interwiki-ha mw-list-item"><a href="https://ha.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ហូសា" lang="ha" hreflang="ha" data-title="Module:Convert" data-language-autonym="Hausa" data-language-local-name="ហូសា" class="interlanguage-link-target"><span>Hausa</span></a></li><li class="interlanguage-link interwiki-hak mw-list-item"><a href="https://hak.wikipedia.org/wiki/%E6%A8%A1%E7%B5%84:Convert" title="模組:Convert – Hakka Chinese" lang="hak" hreflang="hak" data-title="模組:Convert" data-language-autonym="客家語 / Hak-kâ-ngî" data-language-local-name="Hakka Chinese" class="interlanguage-link-target"><span>客家語 / Hak-kâ-ngî</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%99%D7%97%D7%99%D7%93%D7%94:Convert" title="יחידה:Convert – ហេប្រឺ" lang="he" hreflang="he" data-title="יחידה:Convert" data-language-autonym="עברית" data-language-local-name="ហេប្រឺ" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%AE%E0%A5%89%E0%A4%A1%E0%A5%8D%E0%A4%AF%E0%A5%82%E0%A4%B2:Convert" title="मॉड्यूल:Convert – ហិណ្ឌី" lang="hi" hreflang="hi" data-title="मॉड्यूल:Convert" data-language-autonym="हिन्दी" data-language-local-name="ហិណ្ឌី" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ហុងគ្រី" lang="hu" hreflang="hu" data-title="Modul:Convert" data-language-autonym="Magyar" data-language-local-name="ហុងគ្រី" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-hy mw-list-item"><a href="https://hy.wikipedia.org/wiki/%D5%84%D5%B8%D5%A4%D5%B8%D6%82%D5%AC:Convert" title="Մոդուլ:Convert – អាមេនី" lang="hy" hreflang="hy" data-title="Մոդուլ:Convert" data-language-autonym="Հայերեն" data-language-local-name="អាមេនី" class="interlanguage-link-target"><span>Հայերեն</span></a></li><li class="interlanguage-link interwiki-hyw mw-list-item"><a href="https://hyw.wikipedia.org/wiki/%D5%84%D5%B8%D5%A4%D5%B8%D6%82%D5%AC:Convert" title="Մոդուլ:Convert – Western Armenian" lang="hyw" hreflang="hyw" data-title="Մոդուլ:Convert" data-language-autonym="Արեւմտահայերէն" data-language-local-name="Western Armenian" class="interlanguage-link-target"><span>Արեւմտահայերէն</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ឥណ្ឌូណេស៊ី" lang="id" hreflang="id" data-title="Modul:Convert" data-language-autonym="Bahasa Indonesia" data-language-local-name="ឥណ្ឌូណេស៊ី" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ilo mw-list-item"><a href="https://ilo.wikipedia.org/wiki/Modulo:Pagbaliwen" title="Modulo:Pagbaliwen – អ៊ីឡូកូ" lang="ilo" hreflang="ilo" data-title="Modulo:Pagbaliwen" data-language-autonym="Ilokano" data-language-local-name="អ៊ីឡូកូ" class="interlanguage-link-target"><span>Ilokano</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Modulo:Convert" title="Modulo:Convert – អ៊ីតាលី" lang="it" hreflang="it" data-title="Modulo:Convert" data-language-autonym="Italiano" data-language-local-name="អ៊ីតាលី" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB:Convert" title="モジュール:Convert – ជប៉ុន" lang="ja" hreflang="ja" data-title="モジュール:Convert" data-language-autonym="日本語" data-language-local-name="ជប៉ុន" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-jv mw-list-item"><a href="https://jv.wikipedia.org/wiki/Modhul:Convert" title="Modhul:Convert – ជ្វា" lang="jv" hreflang="jv" data-title="Modhul:Convert" data-language-autonym="Jawa" data-language-local-name="ជ្វា" class="interlanguage-link-target"><span>Jawa</span></a></li><li class="interlanguage-link interwiki-ka mw-list-item"><a href="https://ka.wikipedia.org/wiki/%E1%83%9B%E1%83%9D%E1%83%93%E1%83%A3%E1%83%9A%E1%83%98:Convert" title="მოდული:Convert – ហ្សកហ្ស៊ី" lang="ka" hreflang="ka" data-title="მოდული:Convert" data-language-autonym="ქართული" data-language-local-name="ហ្សកហ្ស៊ី" class="interlanguage-link-target"><span>ქართული</span></a></li><li class="interlanguage-link interwiki-kaa mw-list-item"><a href="https://kaa.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Kara-Kalpak" lang="kaa" hreflang="kaa" data-title="Module:Convert" data-language-autonym="Qaraqalpaqsha" data-language-local-name="Kara-Kalpak" class="interlanguage-link-target"><span>Qaraqalpaqsha</span></a></li><li class="interlanguage-link interwiki-kab mw-list-item"><a href="https://kab.wikipedia.org/wiki/Module:Convert" title="Module:Convert – កាប៊ីឡេ" lang="kab" hreflang="kab" data-title="Module:Convert" data-language-autonym="Taqbaylit" data-language-local-name="កាប៊ីឡេ" class="interlanguage-link-target"><span>Taqbaylit</span></a></li><li class="interlanguage-link interwiki-kk mw-list-item"><a href="https://kk.wikipedia.org/wiki/Module:Convert" title="Module:Convert – កាហ្សាក់" lang="kk" hreflang="kk" data-title="Module:Convert" data-language-autonym="Қазақша" data-language-local-name="កាហ្សាក់" class="interlanguage-link-target"><span>Қазақша</span></a></li><li class="interlanguage-link interwiki-kn mw-list-item"><a href="https://kn.wikipedia.org/wiki/%E0%B2%AE%E0%B2%BE%E0%B2%A1%E0%B3%8D%E0%B2%AF%E0%B3%82%E0%B2%B2%E0%B3%8D:Convert" title="ಮಾಡ್ಯೂಲ್:Convert – ខាណាដា" lang="kn" hreflang="kn" data-title="ಮಾಡ್ಯೂಲ್:Convert" data-language-autonym="ಕನ್ನಡ" data-language-local-name="ខាណាដា" class="interlanguage-link-target"><span>ಕನ್ನಡ</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%AA%A8%EB%93%88:Convert" title="모듈:Convert – កូរ៉េ" lang="ko" hreflang="ko" data-title="모듈:Convert" data-language-autonym="한국어" data-language-local-name="កូរ៉េ" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ku mw-list-item"><a href="https://ku.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ឃឺដ" lang="ku" hreflang="ku" data-title="Modul:Convert" data-language-autonym="Kurdî" data-language-local-name="ឃឺដ" class="interlanguage-link-target"><span>Kurdî</span></a></li><li class="interlanguage-link interwiki-lij mw-list-item"><a href="https://lij.wikipedia.org/wiki/Modulo:Convert" title="Modulo:Convert – លីគូរី" lang="lij" hreflang="lij" data-title="Modulo:Convert" data-language-autonym="Ligure" data-language-local-name="លីគូរី" class="interlanguage-link-target"><span>Ligure</span></a></li><li class="interlanguage-link interwiki-lld mw-list-item"><a href="https://lld.wikipedia.org/wiki/Modulo:Convert" title="Modulo:Convert – Ladin" lang="lld" hreflang="lld" data-title="Modulo:Convert" data-language-autonym="Ladin" data-language-local-name="Ladin" class="interlanguage-link-target"><span>Ladin</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Module:Convert" title="Module:Convert – លីទុយអានី" lang="lt" hreflang="lt" data-title="Module:Convert" data-language-autonym="Lietuvių" data-language-local-name="លីទុយអានី" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Modulis:Convert" title="Modulis:Convert – ឡាតវី" lang="lv" hreflang="lv" data-title="Modulis:Convert" data-language-autonym="Latviešu" data-language-local-name="ឡាតវី" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-mad mw-list-item"><a href="https://mad.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ម៉ាឌូរីស" lang="mad" hreflang="mad" data-title="Modul:Convert" data-language-autonym="Madhurâ" data-language-local-name="ម៉ាឌូរីស" class="interlanguage-link-target"><span>Madhurâ</span></a></li><li class="interlanguage-link interwiki-mai mw-list-item"><a href="https://mai.wikipedia.org/wiki/%E0%A4%AE%E0%A5%8B%E0%A4%A1%E0%A5%8D%E0%A4%AF%E0%A5%81%E0%A4%B2:Convert" title="मोड्युल:Convert – ម៉ៃធីលី" lang="mai" hreflang="mai" data-title="मोड्युल:Convert" data-language-autonym="मैथिली" data-language-local-name="ម៉ៃធីលី" class="interlanguage-link-target"><span>मैथिली</span></a></li><li class="interlanguage-link interwiki-min mw-list-item"><a href="https://min.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – មីណាងកាប៊ូ" lang="min" hreflang="min" data-title="Modul:Convert" data-language-autonym="Minangkabau" data-language-local-name="មីណាងកាប៊ូ" class="interlanguage-link-target"><span>Minangkabau</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Convert" title="Модул:Convert – ម៉ាសេដូនី" lang="mk" hreflang="mk" data-title="Модул:Convert" data-language-autonym="Македонски" data-language-local-name="ម៉ាសេដូនី" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%98%E0%B4%9F%E0%B4%95%E0%B4%82:Convert" title="ഘടകം:Convert – ម៉ាឡាយ៉ាឡាម" lang="ml" hreflang="ml" data-title="ഘടകം:Convert" data-language-autonym="മലയാളം" data-language-local-name="ម៉ាឡាយ៉ាឡាម" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-mn mw-list-item"><a href="https://mn.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ម៉ុងហ្គោលី" lang="mn" hreflang="mn" data-title="Module:Convert" data-language-autonym="Монгол" data-language-local-name="ម៉ុងហ្គោលី" class="interlanguage-link-target"><span>Монгол</span></a></li><li class="interlanguage-link interwiki-mnw mw-list-item"><a href="https://mnw.wikipedia.org/wiki/%E1%80%99%E1%80%9D%E1%80%BA%E1%80%82%E1%80%BB%E1%80%B0:Convert" title="မဝ်ဂျူ:Convert – Mon" lang="mnw" hreflang="mnw" data-title="မဝ်ဂျူ:Convert" data-language-autonym="ဘာသာမန်" data-language-local-name="Mon" class="interlanguage-link-target"><span>ဘာသာမန်</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%AD%E0%A4%BE%E0%A4%97:Convert" title="विभाग:Convert – ម៉ារ៉ាធី" lang="mr" hreflang="mr" data-title="विभाग:Convert" data-language-autonym="मराठी" data-language-local-name="ម៉ារ៉ាធី" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ម៉ាឡេ" lang="ms" hreflang="ms" data-title="Modul:Convert" data-language-autonym="Bahasa Melayu" data-language-local-name="ម៉ាឡេ" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-mt mw-list-item"><a href="https://mt.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ម៉ាល់តា" lang="mt" hreflang="mt" data-title="Module:Convert" data-language-autonym="Malti" data-language-local-name="ម៉ាល់តា" class="interlanguage-link-target"><span>Malti</span></a></li><li class="interlanguage-link interwiki-mwl mw-list-item"><a href="https://mwl.wikipedia.org/wiki/M%C3%B3dulo:Convert" title="Módulo:Convert – មីរ៉ានដេស" lang="mwl" hreflang="mwl" data-title="Módulo:Convert" data-language-autonym="Mirandés" data-language-local-name="មីរ៉ានដេស" class="interlanguage-link-target"><span>Mirandés</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikipedia.org/wiki/%E1%80%99%E1%80%B1%E1%80%AC%E1%80%BA%E1%80%82%E1%80%BB%E1%80%B0%E1%80%B8:Convert" title="မော်ဂျူး:Convert – ភូមា" lang="my" hreflang="my" data-title="မော်ဂျူး:Convert" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="ភូមា" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-mzn mw-list-item"><a href="https://mzn.wikipedia.org/wiki/%D9%85%D8%A7%DA%98%D9%88%D9%84:Convert" title="ماژول:Convert – ម៉ាហ្សានដឺរេនី" lang="mzn" hreflang="mzn" data-title="ماژول:Convert" data-language-autonym="مازِرونی" data-language-local-name="ម៉ាហ្សានដឺរេនី" class="interlanguage-link-target"><span>مازِرونی</span></a></li><li class="interlanguage-link interwiki-ne mw-list-item"><a href="https://ne.wikipedia.org/wiki/%E0%A4%AE%E0%A5%8B%E0%A4%A1%E0%A5%8D%E0%A4%AF%E0%A5%81%E0%A4%B2:Convert" title="मोड्युल:Convert – នេប៉ាល់" lang="ne" hreflang="ne" data-title="मोड्युल:Convert" data-language-autonym="नेपाली" data-language-local-name="នេប៉ាល់" class="interlanguage-link-target"><span>नेपाली</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/Modul:Omrekning" title="Modul:Omrekning – ន័រវែស នីនូស" lang="nn" hreflang="nn" data-title="Modul:Omrekning" data-language-autonym="Norsk nynorsk" data-language-local-name="ន័រវែស នីនូស" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ន័រវែស បុកម៉ាល់" lang="nb" hreflang="nb" data-title="Modul:Convert" data-language-autonym="Norsk bokmål" data-language-local-name="ន័រវែស បុកម៉ាល់" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-ny mw-list-item"><a href="https://ny.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ណានចា" lang="ny" hreflang="ny" data-title="Module:Convert" data-language-autonym="Chi-Chewa" data-language-local-name="ណានចា" class="interlanguage-link-target"><span>Chi-Chewa</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikipedia.org/wiki/%E0%AC%AE%E0%AC%A1%E0%AD%8D%E0%AD%9F%E0%AD%81%E0%AC%B2:Convert" title="ମଡ୍ୟୁଲ:Convert – អូឌៀ" lang="or" hreflang="or" data-title="ମଡ୍ୟୁଲ:Convert" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="អូឌៀ" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%AE%E0%A9%8C%E0%A8%A1%E0%A8%BF%E0%A8%8A%E0%A8%B2:Convert" title="ਮੌਡਿਊਲ:Convert – បឹនជាពិ" lang="pa" hreflang="pa" data-title="ਮੌਡਿਊਲ:Convert" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="បឹនជាពិ" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pam mw-list-item"><a href="https://pam.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ផាមភេនហ្គា" lang="pam" hreflang="pam" data-title="Module:Convert" data-language-autonym="Kapampangan" data-language-local-name="ផាមភេនហ្គា" class="interlanguage-link-target"><span>Kapampangan</span></a></li><li class="interlanguage-link interwiki-pih mw-list-item"><a href="https://pih.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Norfuk / Pitkern" lang="pih" hreflang="pih" data-title="Module:Convert" data-language-autonym="Norfuk / Pitkern" data-language-local-name="Norfuk / Pitkern" class="interlanguage-link-target"><span>Norfuk / Pitkern</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Modu%C5%82:Convert" title="Moduł:Convert – ប៉ូឡូញ" lang="pl" hreflang="pl" data-title="Moduł:Convert" data-language-autonym="Polski" data-language-local-name="ប៉ូឡូញ" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-ps mw-list-item"><a href="https://ps.wikipedia.org/wiki/Module:Convert" title="Module:Convert – បាស្តូ" lang="ps" hreflang="ps" data-title="Module:Convert" data-language-autonym="پښتو" data-language-local-name="បាស្តូ" class="interlanguage-link-target"><span>پښتو</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/M%C3%B3dulo:Convert" title="Módulo:Convert – ព័រទុយហ្គាល់" lang="pt" hreflang="pt" data-title="Módulo:Convert" data-language-autonym="Português" data-language-local-name="ព័រទុយហ្គាល់" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – រូម៉ានី" lang="ro" hreflang="ro" data-title="Modul:Convert" data-language-autonym="Română" data-language-local-name="រូម៉ានី" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – រុស្ស៊ី" lang="ru" hreflang="ru" data-title="Модуль:Convert" data-language-autonym="Русский" data-language-local-name="រុស្ស៊ី" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sa mw-list-item"><a href="https://sa.wikipedia.org/wiki/%E0%A4%AA%E0%A4%9F%E0%A4%B2%E0%A4%AE%E0%A5%8D:Convert" title="पटलम्:Convert – សំស្ក្រឹត" lang="sa" hreflang="sa" data-title="पटलम्:Convert" data-language-autonym="संस्कृतम्" data-language-local-name="សំស្ក្រឹត" class="interlanguage-link-target"><span>संस्कृतम्</span></a></li><li class="interlanguage-link interwiki-sat mw-list-item"><a href="https://sat.wikipedia.org/wiki/%E1%B1%A2%E1%B1%B3%E1%B1%B0%E1%B1%A9%E1%B1%9E:Convert" title="ᱢᱳᱰᱩᱞ:Convert – សាន់តាលី" lang="sat" hreflang="sat" data-title="ᱢᱳᱰᱩᱞ:Convert" data-language-autonym="ᱥᱟᱱᱛᱟᱲᱤ" data-language-local-name="សាន់តាលី" class="interlanguage-link-target"><span>ᱥᱟᱱᱛᱟᱲᱤ</span></a></li><li class="interlanguage-link interwiki-sco mw-list-item"><a href="https://sco.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ស្កុត" lang="sco" hreflang="sco" data-title="Module:Convert" data-language-autonym="Scots" data-language-local-name="ស្កុត" class="interlanguage-link-target"><span>Scots</span></a></li><li class="interlanguage-link interwiki-sd mw-list-item"><a href="https://sd.wikipedia.org/wiki/%D9%85%D8%A7%DA%8A%D9%8A%D9%88%D9%84:Convert" title="ماڊيول:Convert – ស៊ីនឌី" lang="sd" hreflang="sd" data-title="ماڊيول:Convert" data-language-autonym="سنڌي" data-language-local-name="ស៊ីនឌី" class="interlanguage-link-target"><span>سنڌي</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – សឺបូក្រូអាត" lang="sh" hreflang="sh" data-title="Modul:Convert" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="សឺបូក្រូអាត" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-shn mw-list-item"><a href="https://shn.wikipedia.org/wiki/%E1%80%99%E1%80%B1%E1%82%83%E1%82%87%E1%81%B5%E1%80%BB%E1%80%B0%E1%80%B8:Convert" title="မေႃႇၵျူး:Convert – សាន" lang="shn" hreflang="shn" data-title="မေႃႇၵျူး:Convert" data-language-autonym="ၽႃႇသႃႇတႆး " data-language-local-name="សាន" class="interlanguage-link-target"><span>ၽႃႇသႃႇတႆး </span></a></li><li class="interlanguage-link interwiki-si mw-list-item"><a href="https://si.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ស្រីលង្កា" lang="si" hreflang="si" data-title="Module:Convert" data-language-autonym="සිංහල" data-language-local-name="ស្រីលង្កា" class="interlanguage-link-target"><span>සිංහල</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Simple English" lang="en-simple" hreflang="en-simple" data-title="Module:Convert" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sk mw-list-item"><a href="https://sk.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ស្លូវ៉ាគី" lang="sk" hreflang="sk" data-title="Modul:Convert" data-language-autonym="Slovenčina" data-language-local-name="ស្លូវ៉ាគី" class="interlanguage-link-target"><span>Slovenčina</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ស្លូវ៉ានី" lang="sl" hreflang="sl" data-title="Modul:Convert" data-language-autonym="Slovenščina" data-language-local-name="ស្លូវ៉ានី" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-smn mw-list-item"><a href="https://smn.wikipedia.org/wiki/Mooduul:Convert" title="Mooduul:Convert – អ៊ីណារីសាមី" lang="smn" hreflang="smn" data-title="Mooduul:Convert" data-language-autonym="Anarâškielâ" data-language-local-name="អ៊ីណារីសាមី" class="interlanguage-link-target"><span>Anarâškielâ</span></a></li><li class="interlanguage-link interwiki-sn mw-list-item"><a href="https://sn.wikipedia.org/wiki/Module:Convert" title="Module:Convert – សូណា" lang="sn" hreflang="sn" data-title="Module:Convert" data-language-autonym="ChiShona" data-language-local-name="សូណា" class="interlanguage-link-target"><span>ChiShona</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Moduli:Convert" title="Moduli:Convert – អាល់បានី" lang="sq" hreflang="sq" data-title="Moduli:Convert" data-language-autonym="Shqip" data-language-local-name="អាល់បានី" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Convert" title="Модул:Convert – ស៊ែប" lang="sr" hreflang="sr" data-title="Модул:Convert" data-language-autonym="Српски / srpski" data-language-local-name="ស៊ែប" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-ss mw-list-item"><a href="https://ss.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ស្វាទី" lang="ss" hreflang="ss" data-title="Module:Convert" data-language-autonym="SiSwati" data-language-local-name="ស្វាទី" class="interlanguage-link-target"><span>SiSwati</span></a></li><li class="interlanguage-link interwiki-su mw-list-item"><a href="https://su.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ស៊ូដង់" lang="su" hreflang="su" data-title="Modul:Convert" data-language-autonym="Sunda" data-language-local-name="ស៊ូដង់" class="interlanguage-link-target"><span>Sunda</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – ស៊ុយអែត" lang="sv" hreflang="sv" data-title="Modul:Convert" data-language-autonym="Svenska" data-language-local-name="ស៊ុយអែត" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/Module:Convert" title="Module:Convert – តាមីល" lang="ta" hreflang="ta" data-title="Module:Convert" data-language-autonym="தமிழ்" data-language-local-name="តាមីល" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-tcy mw-list-item"><a href="https://tcy.wikipedia.org/wiki/%E0%B2%AE%E0%B3%8B%E0%B2%A1%E0%B3%8D%E0%B2%AF%E0%B3%82%E0%B2%B2%E0%B3%8D:Convert" title="ಮೋಡ್ಯೂಲ್:Convert – Tulu" lang="tcy" hreflang="tcy" data-title="ಮೋಡ್ಯೂಲ್:Convert" data-language-autonym="ತುಳು" data-language-local-name="Tulu" class="interlanguage-link-target"><span>ತುಳು</span></a></li><li class="interlanguage-link interwiki-te mw-list-item"><a href="https://te.wikipedia.org/wiki/%E0%B0%AE%E0%B0%BE%E0%B0%A1%E0%B1%8D%E0%B0%AF%E0%B1%82%E0%B0%B2%E0%B1%8D:Convert" title="మాడ్యూల్:Convert – តេលុគុ" lang="te" hreflang="te" data-title="మాడ్యూల్:Convert" data-language-autonym="తెలుగు" data-language-local-name="តេលុគុ" class="interlanguage-link-target"><span>తెలుగు</span></a></li><li class="interlanguage-link interwiki-tet mw-list-item"><a href="https://tet.wikipedia.org/wiki/M%C3%B3dulo:Convert" title="Módulo:Convert – ទីទុំ" lang="tet" hreflang="tet" data-title="Módulo:Convert" data-language-autonym="Tetun" data-language-local-name="ទីទុំ" class="interlanguage-link-target"><span>Tetun</span></a></li><li class="interlanguage-link interwiki-tg mw-list-item"><a href="https://tg.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:Convert" title="Модул:Convert – តាហ្ស៊ីគ" lang="tg" hreflang="tg" data-title="Модул:Convert" data-language-autonym="Тоҷикӣ" data-language-local-name="តាហ្ស៊ីគ" class="interlanguage-link-target"><span>Тоҷикӣ</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A1%E0%B8%AD%E0%B8%94%E0%B8%B9%E0%B8%A5:Convert" title="มอดูล:Convert – ថៃ" lang="th" hreflang="th" data-title="มอดูล:Convert" data-language-autonym="ไทย" data-language-local-name="ថៃ" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-ti mw-list-item"><a href="https://ti.wikipedia.org/wiki/%E1%88%9E%E1%8B%B5%E1%8B%A9%E1%88%8D:Convert" title="ሞድዩል:Convert – ទីហ្គ្រីញ៉ា" lang="ti" hreflang="ti" data-title="ሞድዩል:Convert" data-language-autonym="ትግርኛ" data-language-local-name="ទីហ្គ្រីញ៉ា" class="interlanguage-link-target"><span>ትግርኛ</span></a></li><li class="interlanguage-link interwiki-tk mw-list-item"><a href="https://tk.wikipedia.org/wiki/Module:Convert" title="Module:Convert – តួកម៉េន" lang="tk" hreflang="tk" data-title="Module:Convert" data-language-autonym="Türkmençe" data-language-local-name="តួកម៉េន" class="interlanguage-link-target"><span>Türkmençe</span></a></li><li class="interlanguage-link interwiki-tl mw-list-item"><a href="https://tl.wikipedia.org/wiki/Module:Convert" title="Module:Convert – Tagalog" lang="tl" hreflang="tl" data-title="Module:Convert" data-language-autonym="Tagalog" data-language-local-name="Tagalog" class="interlanguage-link-target"><span>Tagalog</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Mod%C3%BCl:D%C3%B6n%C3%BC%C5%9Ft%C3%BCrme" title="Modül:Dönüştürme – ទួរគី" lang="tr" hreflang="tr" data-title="Modül:Dönüştürme" data-language-autonym="Türkçe" data-language-local-name="ទួរគី" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-tt mw-list-item"><a href="https://tt.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – តាតា" lang="tt" hreflang="tt" data-title="Модуль:Convert" data-language-autonym="Татарча / tatarça" data-language-local-name="តាតា" class="interlanguage-link-target"><span>Татарча / tatarça</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:Convert" title="Модуль:Convert – អ៊ុយក្រែន" lang="uk" hreflang="uk" data-title="Модуль:Convert" data-language-autonym="Українська" data-language-local-name="អ៊ុយក្រែន" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D9%85%D8%A7%DA%88%DB%8C%D9%88%D9%84:Convert" title="ماڈیول:Convert – អ៊ូរឌូ" lang="ur" hreflang="ur" data-title="ماڈیول:Convert" data-language-autonym="اردو" data-language-local-name="អ៊ូរឌូ" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-uz mw-list-item"><a href="https://uz.wikipedia.org/wiki/Modul:Convert" title="Modul:Convert – អ៊ូសបេគ" lang="uz" hreflang="uz" data-title="Modul:Convert" data-language-autonym="Oʻzbekcha / ўзбекча" data-language-local-name="អ៊ូសបេគ" class="interlanguage-link-target"><span>Oʻzbekcha / ўзбекча</span></a></li><li class="interlanguage-link interwiki-vec mw-list-item"><a href="https://vec.wikipedia.org/wiki/Modulo:Convert" title="Modulo:Convert – វេណេតូ" lang="vec" hreflang="vec" data-title="Modulo:Convert" data-language-autonym="Vèneto" data-language-local-name="វេណេតូ" class="interlanguage-link-target"><span>Vèneto</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/M%C3%B4_%C4%91un:Convert" title="Mô đun:Convert – វៀតណាម" lang="vi" hreflang="vi" data-title="Mô đun:Convert" data-language-autonym="Tiếng Việt" data-language-local-name="វៀតណាម" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-vo mw-list-item"><a href="https://vo.wikipedia.org/wiki/Module:Convert" title="Module:Convert – វូឡាពូក" lang="vo" hreflang="vo" data-title="Module:Convert" data-language-autonym="Volapük" data-language-local-name="វូឡាពូក" class="interlanguage-link-target"><span>Volapük</span></a></li><li class="interlanguage-link interwiki-war mw-list-item"><a href="https://war.wikipedia.org/wiki/Module:Convert" title="Module:Convert – វ៉ារេយ" lang="war" hreflang="war" data-title="Module:Convert" data-language-autonym="Winaray" data-language-local-name="វ៉ារេយ" class="interlanguage-link-target"><span>Winaray</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/%E6%A8%A1%E5%9D%97:Convert" title="模块:Convert – អ៊ូចិន" lang="wuu" hreflang="wuu" data-title="模块:Convert" data-language-autonym="吴语" data-language-local-name="អ៊ូចិន" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-xh mw-list-item"><a href="https://xh.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ឃសា" lang="xh" hreflang="xh" data-title="Module:Convert" data-language-autonym="IsiXhosa" data-language-local-name="ឃសា" class="interlanguage-link-target"><span>IsiXhosa</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/Module:Convert" title="Module:Convert – ចិន" lang="zh" hreflang="zh" data-title="Module:Convert" data-language-autonym="中文" data-language-local-name="ចិន" class="interlanguage-link-target"><span>中文</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/%E6%A8%A1%E7%B5%84:Convert" title="模組:Convert – Minnan" lang="nan" hreflang="nan" data-title="模組:Convert" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="Minnan" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E6%A8%A1%E7%B5%84:Convert" title="模組:Convert – កន្តាំង" lang="yue" hreflang="yue" data-title="模組:Convert" data-language-autonym="粵語" data-language-local-name="កន្តាំង" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q14033926#sitelinks-wikipedia" title="កែប្រែតំណភ្ជាប់អន្តរភាសា" class="wbc-editpage">កែប្រែតំណភ្ជាប់</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="លំហឈ្មោះ"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Module:Convert" title="View the module page [c]" accesskey="c"><span>Module</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Module_talk:Convert&action=edit&redlink=1" rel="discussion" class="new" title="ការពិភាក្សាអំពីទំព័រខ្លឹមសារនេះ (ទំព័រនេះមិនទាន់មាននៅឡើយទេ) [t]" accesskey="t"><span>ការពិភាក្សា</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="គំហើញ"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Module:Convert"><span>អាន</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Module:Convert&action=edit" title="កែប្រែកូដរបស់ទំព័រនេះ [e]" accesskey="e"><span>កែប្រែកូដ</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Module:Convert&action=history" title="កំណែកន្លងមករបស់ទំព័រនេះ ។ [h]" accesskey="h"><span>មើលប្រវត្តិ</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="ឧបករណ៍" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">ឧបករណ៍</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">ឧបករណ៍</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">ប្ដូរទីតាំងទៅរបារចំហៀង</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">លាក់</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="ជម្រើសផ្សេងទៀត" > <div class="vector-menu-heading"> សកម្មភាព </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Module:Convert"><span>អាន</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Module:Convert&action=edit" title="កែប្រែកូដរបស់ទំព័រនេះ [e]" accesskey="e"><span>កែប្រែកូដ</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Module:Convert&action=history"><span>មើលប្រវត្តិ</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> ទូទៅ </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%A2%E1%9F%92%E1%9E%9C%E1%9E%B8%E1%9E%8A%E1%9F%82%E1%9E%9B%E1%9E%97%E1%9F%92%E1%9E%87%E1%9E%B6%E1%9E%94%E1%9F%8B%E1%9E%98%E1%9E%80%E1%9E%91%E1%9E%B8%E1%9E%93%E1%9F%81%E1%9F%87/Module:Convert" title="បញ្ជីទំព័វិគីទាំងអស់ដែលភ្ជាប់មកទីនេះ [j]" accesskey="j"><span>អ្វីដែលភ្ជាប់មកទីនេះ</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%94%E1%9F%86%E1%9E%9B%E1%9E%B6%E1%9E%9F%E1%9F%8B%E1%9E%94%E1%9F%92%E1%9E%8A%E1%9E%BC%E1%9E%9A%E1%9E%91%E1%9E%B6%E1%9E%80%E1%9F%8B%E1%9E%91%E1%9E%B7%E1%9E%93/Module:Convert" rel="nofollow" title="បន្លាស់ប្ដូរថ្មីៗក្នុងទំព័រដែលត្រូវបានភ្ជាប់មកទំព័រនេះ [k]" accesskey="k"><span>បន្លាស់ប្ដូរដែលពាក់ព័ន្ធ</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=km" title="ផ្ទុកឯកសារឡើង [u]" accesskey="u"><span>ផ្ទុកឯកសារឡើង</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F%E1%9F%97" title="បញ្ជីនៃទំព័រពិសេសទាំងអស់ [q]" accesskey="q"><span>ទំព័រពិសេសៗ</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Module:Convert&oldid=145339" title="តំណភ្ជាប់អចិន្ត្រៃយ៍ដែលភ្ជាប់មកកំណែនេះរបស់ទំព័រនេះ"><span>តំណភ្ជាប់អចិន្ត្រៃយ៍</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Module:Convert&action=info" title="ព័ត៌មានបន្ថែមអំពីទំព័រនេះ"><span>ព័ត៌មានអំពីទំព័រនេះ</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:UrlQ%C4%B1sald%C4%B1c%C4%B1s%C4%B1&url=https%3A%2F%2Fkm.wikipedia.org%2Fwiki%2FModule%3AConvert"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:QrKodu&url=https%3A%2F%2Fkm.wikipedia.org%2Fwiki%2FModule%3AConvert"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> បោះពុម្ព/នាំចេញ </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=%E1%9E%96%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%9F:DownloadAsPdf&page=Module%3AConvert&action=show-download-screen"><span>ទាញយកជាPDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="ទម្រង់សម្រាប់បោះពុម្ភរបស់ទំព័រនេះ [p]" accesskey="p"><span>ទម្រង់សម្រាប់បោះពុម្ភ</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> ក្នុងគម្រោងផ្សេងៗទៀត </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Module:Convert" hreflang="en"><span>Wikimedia Commons</span></a></li><li class="wb-otherproject-link wb-otherproject-outreach mw-list-item"><a href="https://outreach.wikimedia.org/wiki/Module:Convert" hreflang="en"><span>Wikimedia Outreach</span></a></li><li class="wb-otherproject-link wb-otherproject-species mw-list-item"><a href="https://species.wikimedia.org/wiki/Module:Convert" hreflang="en"><span>វិគីជីវសាស្ត្រ</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q14033926" title="Link to connected data repository item [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">ប្ដូរទីតាំងទៅរបារចំហៀង</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">លាក់</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">ពីវិគីភីឌា</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="km" dir="ltr"><p>This module converts a value from one unit of measurement to another. For example: </p> <ul><li><code>{{convert|123|lb|kg}}</code> → 123 pounds (56 kg)</li></ul> <p>The module is called using a template—parameters passed to the template are used by this module to control how a conversion is performed. For example, units can be abbreviated (like <code>kg</code>), or displayed as names (like <code>kilogram</code>), and the output value can be rounded to a specified precision. </p><p>The template that invokes this module is: </p> <ul><li><a href="/w/index.php?title=%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%82%E1%9F%86%E1%9E%9A%E1%9E%BC:Convert/sandboxlua&action=edit&redlink=1" class="new" title="ទំព័រគំរូ:Convert/sandboxlua (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Template:Convert/sandboxlua</a></li></ul> <p>The following modules are required: </p> <ul><li><a class="mw-selflink selflink">Module:Convert</a> – <i>(this module)</i> code to convert units</li> <li><a href="/wiki/Module:Convert/data" title="Module:Convert/data">Module:Convert/data</a> – unit definitions</li> <li><a href="/wiki/Module:Convert/text" title="Module:Convert/text">Module:Convert/text</a> – text messages and parameter names and values</li></ul> <p>The following modules are optional and are used only if required and if the module exists: </p> <ul><li><a href="/w/index.php?title=Module:Convert/extra&action=edit&redlink=1" class="new" title="Module:Convert/extra (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Module:Convert/extra</a> – extra (temporary) unit definitions; used if a unit is not found in <a href="/wiki/Module:Convert/data" title="Module:Convert/data">Module:Convert/data</a></li> <li><a href="/wiki/Module:ConvertNumeric" title="Module:ConvertNumeric">Module:ConvertNumeric</a> – code to spell an input value in words (only English is supported)</li></ul> <p>Many testcase pages are available. Currently, the testcases compare the output from the current <a href="/wiki/%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%82%E1%9F%86%E1%9E%9A%E1%9E%BC:Convert" title="ទំព័រគំរូ:Convert">Template:Convert</a> with the output from <a href="/w/index.php?title=%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%82%E1%9F%86%E1%9E%9A%E1%9E%BC:Convert/sandboxlua&action=edit&redlink=1" class="new" title="ទំព័រគំរូ:Convert/sandboxlua (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Template:Convert/sandboxlua</a>. </p> <ul><li><a href="/w/index.php?title=%E1%9E%91%E1%9F%86%E1%9E%96%E1%9F%90%E1%9E%9A%E1%9E%82%E1%9F%86%E1%9E%9A%E1%9E%BC:Convert/testcases&action=edit&redlink=1" class="new" title="ទំព័រគំរូ:Convert/testcases (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Template:Convert/testcases</a> – template tests</li></ul> <p>Units are defined in the wikitext of the master list of units. Wikitext copied from that page is translated to create the unit definitions by running a Lua script on a local computer. </p> <ul><li><a href="/w/index.php?title=%E1%9E%A2%E1%9F%92%E1%9E%93%E1%9E%80%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%BE%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%B6%E1%9E%9F%E1%9F%8B:Johnuniq/Conversion_data&action=edit&redlink=1" class="new" title="អ្នកប្រើប្រាស់:Johnuniq/Conversion data (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">User:Johnuniq/Conversion data</a> – master list of unit definitions</li> <li><a href="/w/index.php?title=Module:Convert/makeunits&action=edit&redlink=1" class="new" title="Module:Convert/makeunits (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Module:Convert/makeunits</a> – script to translate wikitext from <a href="/w/index.php?title=%E1%9E%A2%E1%9F%92%E1%9E%93%E1%9E%80%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%BE%E1%9E%94%E1%9F%92%E1%9E%9A%E1%9E%B6%E1%9E%9F%E1%9F%8B:Johnuniq/Conversion_data&action=edit&redlink=1" class="new" title="អ្នកប្រើប្រាស់:Johnuniq/Conversion data (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">User:Johnuniq/Conversion data</a> to Lua source for <a href="/wiki/Module:Convert/data" title="Module:Convert/data">Module:Convert/data</a></li></ul> <p><a href="/wiki/Module:Convert/data" title="Module:Convert/data">Module:Convert/data</a> is transcluded into every page using the convert module, so experimenting with a new unit in that module would involve a significant overhead. The <a href="/w/index.php?title=Module:Convert/extra&action=edit&redlink=1" class="new" title="Module:Convert/extra (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">Module:Convert/extra</a> module is an alternative which is only transcluded on pages with a unit that is not defined in the main data module. </p> <div class="mw-heading mw-heading3"><h3 id="Configuration">Configuration</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Module:Convert/doc&action=edit&section=T-1" title="កែប្រែផ្នែក៖ Configuration"><span>កែប្រែ</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The template that invokes this module can define options to configure the module. For example: </p> <ul><li><code>{{#invoke:convert | convert | numdot = , | numsep = . }}</code></li></ul> <dl><dd>Sets the <a href="/w/index.php?title=Decimal_mark&action=edit&redlink=1" class="new" title="Decimal mark (ទំព័រនេះមិនទាន់មាននៅឡើយទេ)">decimal mark</a> to be a comma, and the thousands separator to be a dot.</dd></dl> <p>Other options, with default values, are: </p> <ul><li><code>maxsigfig = 14</code> – maximum number of significant figures</li> <li><code>warnings = no</code> – yes if invalid options should show a warning</li></ul> <p>Other configuration is available in the <code>translation_table</code> at <a href="/wiki/Module:Convert/text" title="Module:Convert/text">Module:Convert/text</a>. For example, <a href="https://bn.wikipedia.org/wiki/Module:Convert/text" class="extiw" title="bn:Module:Convert/text">bn:Module:Convert/text</a> uses: </p> <ul><li><code>group = 2</code> – group numbers 3 digits, then 2 digits</li> <li><code>plural_suffix = ''</code> – disable plural unit names (do not append "s")</li> <li>Tables to translate digits to and from the English digits used in calculations.</li></ul> <p><a href="/wiki/Module:Convert/text" title="Module:Convert/text">Module:Convert/text</a> contains all text used for input parameters and for output messages and categories. For example, <code>lk=on</code> may be used at en.wikipedia to link each displayed unit to its article. The text module could be edited to replace "<code>lk</code>" and "<code>on</code>" with any desired text. </p> <hr /><pre lang="en" dir="ltr" class="mw-code mw-script"> -- Convert a value from one unit of measurement to another. -- Example: {{convert|123|lb|kg}} --> 123 pounds (56 kg) local MINUS = '−' -- Unicode U+2212 MINUS SIGN (UTF-8: e2 88 92) local abs = math.abs local floor = math.floor local format = string.format local log10 = math.log10 local ustring = mw.ustring local ulen = ustring.len local usub = ustring.sub -- Configuration options to keep magic values in one location. -- Conversion data and message text are defined in separate modules. local numdot, numsep -- each must be a single byte for simple regex search/replace local maxsigfig, warnings local default_exceptions, link_exceptions, all_units local SIprefixes, all_categories, all_messages, customary_units, disp_joins local en_option_name, en_option_value, eng_scales, range_aliases, range_types local group_method = 3 -- code for how many digits are in a group local plural_suffix = 's' -- only other useful value is probably '' to disable plural unit names local from_en_table -- to translate an output string of en digits to local language local to_en_table -- to translate an input string of digits in local language to en -- All units should be defined in the data module. However, to cater for quick changes -- and experiments, any unknown unit is looked up in an extra data module, if it exists. -- That module would be transcluded in only a small number of pages, so there should be -- little server overhead from making changes, and changes should propagate quickly. local extra_module -- name of module with extra units local extra_units -- nil or table of extra units from extra_module local function boolean(text) -- Return true if text represents a "true" option value. if text then text = text:lower() if text == '1' or text == 'y' or text == 'yes' or text == 'on' or text == 'true' then return true end end end local function from_en(text) -- Input is a string representing a number in en digits with '.' decimal mark, -- without digit grouping (which is done just after calling this). -- Return the translation of the string with numdot and digits in local language. if numdot ~= '.' then text = text:gsub('%.', numdot) end if from_en_table then text = text:gsub('%d', from_en_table) end return text end local function to_en(text) -- Input is a string representing a number in the local language with -- an optional numdot decimal mark and numsep digit grouping. -- Return the translation of the string with '.' mark and en digits, -- and no separators (they have to be removed here to handle cases like -- numsep = '.' and numdot = ',' with input "1.234.567,8"). if numsep ~= '' then text = text:gsub('[' .. numsep .. ']', '') -- use '[x]' in case x is '.' end if numdot ~= '.' then text = text:gsub('[' .. numdot .. ']', '.') end if to_en_table then text = ustring.gsub(text, '%d', to_en_table) end return text end local spell_module -- name of module that can spell numbers local speller -- function from that module to handle spelling (set if spelling is wanted) local function set_config(frame) -- Set configuration options from template #invoke or defaults. local args = frame.args numdot = args.numdot or '.' -- decimal mark before fractional digits numsep = args.numsep or ',' -- group separator for numbers (',', '.', '') maxsigfig = args.maxsigfig or 14 -- maximum number of significant figures warnings = boolean(args.warnings) -- true if want warnings for invalid options -- Scribunto sets the global variable 'mw'. -- A testing program can set the global variable 'is_test_run'. local data_module, text_module, data_code, text_code if is_test_run then local langcode = mw.language.getContentLanguage().code data_module = "convertdata-" .. langcode text_module = "converttext-" .. langcode extra_module = "convertextra-" .. langcode spell_module = "ConvertNumeric" else local sandbox = boolean(args.sandbox) and '/sandbox' or '' data_module = "Module:Convert/data" .. sandbox text_module = "Module:Convert/text" .. sandbox extra_module = "Module:Convert/extra" .. sandbox spell_module = "Module:ConvertNumeric" end data_code = mw.loadData(data_module) text_code = mw.loadData(text_module) default_exceptions = data_code.default_exceptions link_exceptions = data_code.link_exceptions all_units = data_code.all_units SIprefixes = text_code.SIprefixes all_categories = text_code.all_categories all_messages = text_code.all_messages customary_units = text_code.customary_units disp_joins = text_code.disp_joins en_option_name = text_code.en_option_name en_option_value = text_code.en_option_value eng_scales = text_code.eng_scales range_aliases = text_code.range_aliases range_types = text_code.range_types local translation = text_code.translation_table if translation then if translation.group then group_method = translation.group end if translation.plural_suffix then plural_suffix = translation.plural_suffix end from_en_table = translation.from_en local use_workaround = true if use_workaround then -- 2013-07-05 workaround bug by making a copy of the required table. -- mw.ustring.gsub fails with a table (to_en_table) as the replacement, -- if the table is accessed via mw.loadData. local source = translation.to_en if source then to_en_table = {} for k, v in pairs(source) do to_en_table[k] = v end end else to_en_table = translation.to_en end end end local function collection() -- Return a table to hold items. return { n = 0, add = function (self, item) self.n = self.n + 1 self[self.n] = item end, } end local function split(text, delimiter) -- Return a numbered table with fields from splitting text. -- The delimiter is used in a regex without escaping (for example, '.' would fail). -- Each field has any leading/trailing whitespace removed. local t = {} text = text .. delimiter -- to get last item for item in text:gmatch('%s*(.-)%s*' .. delimiter) do table.insert(t, item) end return t end local function strip(text) -- If text is a string, return its content with no leading/trailing -- whitespace. Otherwise return nil (a nil argument gives a nil result). if type(text) == 'string' then return text:match("^%s*(.-)%s*$") end end local function message(mcode) -- Return wikitext for an error message, including category if specified -- for the message type. -- mcode = numbered table specifying the message: -- mcode[1] = 'cvt_xxx' (string used as a key to get message info) -- mcode[2] = 'parm1' (string to replace first %s if any in message) -- mcode[3] = 'parm2' (string to replace second %s if any in message) -- mcode[4] = 'parm3' (string to replace third %s if any in message) local msg = all_messages[mcode[1]] if msg then local text = format(msg[1] or 'Missing message', mcode[2] or '?', mcode[3] or '?', mcode[4] or '?') local cat = all_categories[msg[2]] or '' local prefix = all_messages[msg.warning and 'cvt_prefix_warning' or 'cvt_prefix_error'] or '' local suffix = (prefix == '') and '' or '</span>' local regex, replace = msg.regex, msg.replace if regex and replace then text = text:gsub(regex, replace) end return prefix .. ' ' .. text .. cat .. suffix end return 'Convert internal error: unknown message' end local function add_warning(parms, mcode, text) -- If enabled, add a warning that will be displayed after the convert result. -- To reduce output noise, only the first warning is displayed. if warnings then if parms.warnings == nil then parms.warnings = message({ mcode, text }) end end end local function spell_number(parms, number, numerator, denominator) -- Return result of spelling (number, numerator, denominator), or -- return nil if spelling is not available or not supported for given text. -- Examples (each value must be a string or nil): -- number numerator denominator output -- ------ --------- ----------- ------------------- -- "1.23" nil nil one point two three -- "1" "2" "3" one and two thirds -- nil "2" "3" two thirds if not speller then local function get_speller(module) return require(module).spell_number end local success success, speller = pcall(get_speller, spell_module) if not success or type(speller) ~= 'function' then add_warning(parms, 'cvt_spell_unavailable') return nil end end local case = parms.opt_spell_upper parms.opt_spell_upper = nil -- only uppercase first number in a multiple unit local sp = not parms.opt_sp_us local adj = parms.opt_adjectival return speller(number, numerator, denominator, case, sp, adj) end ------------------------------------------------------------------------ -- BEGIN: Code required only for built-in units. -- LATER: If need much more code, move to another module to simplify this module. local function speed_of_sound(altitude) -- This is for the Mach built-in unit of speed. -- Return speed of sound in metres per second at given altitude in feet. -- If no altitude given, use default (zero altitude = sea level). -- Table gives speed of sound in miles per hour at various altitudes: -- altitude = -17,499 to 302,499 feet -- mach_table[a + 4] = s where -- a = (altitude / 5000) rounded to nearest integer (-3 to 60) -- s = speed of sound (mph) at that altitude -- LATER: Should calculate result from an interpolation between the next -- lower and higher altitudes in table, rather than rounding to nearest. -- From: http://www.aerospaceweb.org/question/atmosphere/q0112.shtml local mach_table = { -- a = 799.5, 787.0, 774.2, 761.207051, -- -3 to 0 748.0, 734.6, 721.0, 707.0, 692.8, 678.3, 663.5, 660.1, 660.1, 660.1, -- 1 to 10 660.1, 660.1, 660.1, 662.0, 664.3, 666.5, 668.9, 671.1, 673.4, 675.6, -- 11 to 20 677.9, 683.7, 689.9, 696.0, 702.1, 708.1, 714.0, 719.9, 725.8, 731.6, -- 21 to 30 737.3, 737.7, 737.7, 736.2, 730.5, 724.6, 718.8, 712.9, 707.0, 701.1, -- 31 to 40 695.0, 688.9, 682.8, 676.6, 670.4, 664.1, 657.8, 652.9, 648.3, 643.7, -- 41 to 50 639.1, 634.4, 629.6, 624.8, 620.0, 615.2, 613.2, 613.2, 613.2, 613.5, -- 51 to 60 } altitude = altitude or 0 local a = (altitude < 0) and -altitude or altitude a = floor(a / 5000 + 0.5) if altitude < 0 then a = -a end if a < -3 then a = -3 elseif a > 60 then a = 60 end return mach_table[a + 4] * 0.44704 -- mph converted to m/s end -- END: Code required only for built-in units. ------------------------------------------------------------------------ local function override_from(out_table, in_table, fields) -- Copy the specified fields from in_table to out_table, but do not -- copy nil fields (keep any corresponding field in out_table). for _, field in ipairs(fields) do if in_table[field] then out_table[field] = in_table[field] end end end local function shallow_copy(t) -- Return a shallow copy of table t. -- Do not need the features and overhead of the Scribunto mw.clone(). local result = {} for k, v in pairs(t) do result[k] = v end return result end local unit_mt = { -- Metatable to get missing values for a unit that does not accept SI prefixes, -- or for a unit that accepts prefixes but where no prefix was used. -- In the latter case, and before use, fields symbol, name1, name1_us -- must be set from _symbol, _name1, _name1_us respectively. __index = function (self, key) local value if key == 'name1' or key == 'sym_us' then value = self.symbol elseif key == 'name2' then value = self.name1 .. plural_suffix elseif key == 'name1_us' then value = self.name1 if not rawget(self, 'name2_us') then -- If name1_us is 'foot', do not make name2_us by appending plural_suffix. self.name2_us = self.name2 end elseif key == 'name2_us' then local raw1_us = rawget(self, 'name1_us') if raw1_us then value = raw1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 elseif key == 'builtin' then value = false else return nil end rawset(self, key, value) return value end } local unit_prefixed_mt = { -- Metatable to get missing values for a unit that accepts SI prefixes, -- and where a prefix has been used. -- Before use, fields si_name, si_prefix must be defined. __index = function (self, key) local value if key == 'symbol' then value = self.si_prefix .. self._symbol elseif key == 'sym_us' then value = self.symbol -- always the same as sym_us for prefixed units elseif key == 'name1' then -- prefix_position is a byte (not character) position, so use Lua's sub(). local pos = rawget(self, 'prefix_position') or 1 value = self._name1 value = value:sub(1, pos - 1) .. self.si_name .. value:sub(pos) elseif key == 'name2' then value = self.name1 .. plural_suffix elseif key == 'name1_us' then value = rawget(self, '_name1_us') if value then local pos = rawget(self, 'prefix_position') or 1 value = value:sub(1, pos - 1) .. self.si_name .. value:sub(pos) else value = self.name1 end elseif key == 'name2_us' then if rawget(self, '_name1_us') then value = self.name1_us .. plural_suffix else value = self.name2 end elseif key == 'link' then value = self.name1 elseif key == 'builtin' then value = false else return nil end rawset(self, key, value) return value end } local unit_per_mt = { -- Metatable to get values for a "per" unit of form "x/y". -- This is never called to determine a unit name or link because "per" units -- are handled as a special case. __index = function (self, key) local value if key == 'symbol' then local per = self.per local unit1, unit2 = per[1], per[2] if unit1 then value = unit1[key] .. '/' .. unit2[key] else value = '/' .. unit2[key] end elseif key == 'sym_us' then value = self.symbol elseif key == 'scale' then local per = self.per local unit1, unit2 = per[1], per[2] value = (unit1 and unit1.scale or 1) / unit2.scale elseif key == 'builtin' then value = false else return nil end rawset(self, key, value) return value end } local function lookup(unitcode, opt_sp_us, what, utable, fails, depth) -- Return true, t where t is a copy of the unit's converter table, -- or return false, t where t is an error message table. -- Parameter opt_sp_us is true for US spelling of SI prefixes and -- the symbol and name of the unit. If true, the result includes field -- sp_us = true (that field may also have been in the unit definition). -- Parameter 'what' determines whether combination units are accepted: -- 'no_combination' : single unit only -- 'any_combination' : single unit or combination or output multiple -- 'only_multiple' : single unit or output multiple only -- Parameter unitcode is a symbol (like 'g'), with an optional SI prefix (like 'kg'). -- If, for example, 'kg' is in this table, that entry is used; -- otherwise the prefix ('k') is applied to the base unit ('g'). -- If unitcode is a known combination code (and if allowed by what), -- a table of output multiple unit tables is included in the result. -- For compatibility with the old template, underscores in unitcode are replaced -- with spaces so {{convert|350|board_feet}} --> 350 board feet (0.83 m³). utable = utable or all_units fails = fails or {} depth = depth and depth + 1 or 1 if depth > 9 then -- There are ways to mistakenly define units which result in infinite -- recursion when lookup() is called. That gives a long delay and very -- confusing error messages, so the depth parameter is used as a guard. return false, { 'cvt_lookup', unitcode } end if unitcode == nil or unitcode == '' then return false, { 'cvt_no_unit' } end unitcode = unitcode:gsub('_', ' ') local t = utable[unitcode] if t then if t.shouldbe then return false, { 'cvt_should_be', t.shouldbe } end local force_sp_us = opt_sp_us if t.sp_us then force_sp_us = true opt_sp_us = true end local target = t.target -- nil, or unitcode is an alias for this target if target then local success, result = lookup(target, opt_sp_us, what, utable, fails, depth) if not success then return false, result end override_from(result, t, { 'customary', 'default', 'link', 'symbol', 'symlink' }) local multiplier = t.multiplier if multiplier then result.multiplier = tostring(multiplier) result.scale = result.scale * multiplier end return true, result end local per = t.per -- nil/false, or a numbered table for "x/y" units if per then local result = { utype = t.utype, per = {} } override_from(result, t, { 'default', 'invert', 'iscomplex', 'symbol', 'symlink' }) result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation local cvt = result.per local prefix for i, v in ipairs(per) do if i == 1 and (v == '$' or v == '£') then prefix = v else local success, t = lookup(v, opt_sp_us, 'no_combination', utable, fails, depth) if not success then return false, t end cvt[i] = t if t.sp_us then -- if the top or bottom unit forces sp=us, set the per unit to use the correct name/symbol force_sp_us = true end end end if prefix then result.vprefix = prefix else result.vprefix = false -- to avoid calling __index end result.sp_us = force_sp_us return true, setmetatable(result, unit_per_mt) end local combo = t.combination -- nil or a table of unitcodes if combo then local multiple = t.multiple if what == 'no_combination' or (what == 'only_multiple' and multiple == nil) then return false, { 'cvt_bad_unit', unitcode } end -- Recursively create a combination table containing the -- converter table of each unitcode. local result = { utype = t.utype, multiple = multiple, combination = {} } local cvt = result.combination for i, v in ipairs(combo) do local success, t = lookup(v, opt_sp_us, multiple and 'no_combination' or 'only_multiple', utable, fails, depth) if not success then return false, t end cvt[i] = t end return true, result end local result = shallow_copy(t) result.sp_us = force_sp_us if result.prefixes then result.symbol = result._symbol result.name1 = result._name1 result.name1_us = result._name1_us end return true, setmetatable(result, unit_mt) end for plen = SIprefixes[1] or 2, 1, -1 do -- Look for an SI prefix; should never occur with an alias. -- Check for longer prefix first ('dam' is decametre). -- SIprefixes[1] = prefix maximum #characters (as seen by mw.ustring.sub). local prefix = usub(unitcode, 1, plen) local si = SIprefixes[prefix] if si then local t = utable[usub(unitcode, plen+1)] if t and t.prefixes then local result = shallow_copy(t) if opt_sp_us then result.sp_us = true end if result.sp_us and si.name_us then result.si_name = si.name_us else result.si_name = si.name end result.si_prefix = si.prefix or prefix result.scale = t.scale * 10 ^ (si.exponent * t.prefixes) return true, setmetatable(result, unit_prefixed_mt) end end end -- Accept any unit with an engineering notation prefix like "e6cuft" -- (million cubic feet), but not chained prefixes like "e3e6cuft", -- and not if the unit is a combination or multiple, -- and not if the unit has an offset or is a built-in. -- Only en digits are accepted. local exponent, baseunit = unitcode:match('^e(%d+)(.*)') if exponent then local engscale = eng_scales[exponent] if engscale then local success, result = lookup(baseunit, opt_sp_us, 'no_combination', utable, fails, depth) if not success then return false, result end if not (result.offset or result.builtin or result.engscale) then result.defkey = unitcode -- key to lookup default exception result.engscale = engscale result.scale = result.scale * 10 ^ tonumber(exponent) return true, result end end end if not extra_units then local success, extra = pcall(function () return require(extra_module).extra_units end) if success and type(extra) == 'table' then extra_units = extra end end if extra_units then -- A unit in one data table might refer to a unit in the other table, so -- switch between them, relying on fails or depth to terminate loops. local failed = fails[unitcode] if not failed then fails[unitcode] = true local other = (utable == all_units) and extra_units or all_units local success, result = lookup(unitcode, opt_sp_us, what, other, fails, depth) if success then return true, result end end end return false, { 'cvt_unknown', unitcode } end local function valid_number(num) -- Return true if num is a valid number. -- Expressed as a string, overflow or other problems are indicated with -- text like "1.#INF" or ".#IND" which are regarded as invalid here. if type(num) == 'number' and tostring(num):find('#', 1, true) == nil then return true end end local function ntsh(num, debug) -- Return html text to be used for a hidden sort key so that -- the given number will be sorted in numeric order. -- If debug == true, output is in a box (not hidden). -- This implements Template:Ntsh (number table sorting, hidden). local result, style if not valid_number(num) then if num < 0 then result = '1000000000000000000' else result = '9000000000000000000' end elseif num == 0 then result = '5000000000000000000' else local mag = floor(log10(abs(num)) + 1e-14) local prefix if num > 0 then prefix = 7000 + mag else prefix = 2999 - mag num = num + 10^(mag+1) end result = format('%d', prefix) .. format('%015.0f', floor(num * 10^(14-mag))) end if debug then style = 'border:1px solid' else style = 'display:none' end return '<span style="' .. style .. '">' .. result .. '</span>' end local function hyphenated(name) -- Return a hyphenated form of given name (for adjectival usage). -- This uses a simple and efficient procedure that works for most cases. -- Some units (if used) would require more, and can later think about -- adding a method to handle exceptions. -- The procedure is to replace each space with a hyphen, but -- not a space after ')' [for "(pre-1954&nbsp;US) nautical mile"], and -- not spaces immediately before '(' or in '(...)' [for cases like -- "British thermal unit (ISO)" and "Calorie (International Steam Table)"]. local pos if name:sub(1, 1) == '(' then pos = name:find(')', 1, true) if pos then return name:sub(1, pos+1) .. name:sub(pos+2):gsub(' ', '-') end elseif name:sub(-1, -1) == ')' then pos = name:find('(', 1, true) if pos then return name:sub(1, pos-2):gsub(' ', '-') .. name:sub(pos-1) end end return name:gsub(' ', '-') end local function hyphenated_maybe(parms, want_name, sep, id, inout) -- Return s, f where -- s = id, possibly modified -- f = true if hyphenated -- Possible modifications: hyphenate; prepend '-'; append mid text. if id == nil or id == '' then return '' end local mid if parms.opt_adjectival then if inout == (parms.opt_flip and 'out' or 'in') then mid = parms.mid end if want_name then return '-' .. hyphenated(id) .. (mid or ''), true end end return sep .. id .. (mid or '') end local function change_sign(text) -- Change sign of text for correct appearance because it is negated. if text:sub(1, 1) == '-' then return text:sub(2) end return '-' .. text end local function use_minus(text) -- Return text with Unicode minus instead of '-', if present. if text:sub(1, 1) == '-' then return MINUS .. text:sub(2) end return text end local function digit_grouper(method, gaps) -- Return a table to hold groups of digits which can be joined with -- suitable separators (such as commas). -- Each group is separately translated to the local language because the -- separators may include '.' characters which should not be translated. -- Parameter method is a number or nil: -- 3 for 3-digit grouping, or -- 2 for 3-then-2 grouping. -- Parameter gaps is true to use <span> gaps (numsep ignored). return { n = 0, add = function (self, digits) self.n = self.n + 1 self[self.n] = from_en(digits) end, join = function (self, rhs) -- Concatenate in reverse order. if gaps then local result = '' for i = 1, self.n - 1 do result = '<span style="margin-left: 0.25em">' .. self[i] .. '</span>' .. result end return '<span style="white-space: nowrap">' .. self[self.n] .. result .. from_en(rhs) .. '</span>' else local result = self[1] for i = 2, self.n do result = self[i] .. numsep .. result end return result .. from_en(rhs) end end, step = 3, next_position = function (self, previous) -- Return position of digit just before next group. -- Digits are grouped from right-to-left (least significant first). local result = previous - self.step if method == 2 then self.step = 2 -- may need more (3, 2, 2, 3, 2, 2, ...) in some languages end return (result < 0) and 0 or result end, } end local function with_separator(parms, text) -- Input text is a number in en digits and with '.' decimal mark. -- Return an equivalent of text, formatted for display: -- with a custom decimal mark instead of '.', if wanted -- with thousand separators inserted, if wanted -- digits in local language -- The given text is like '123' or '12345.6789' or '1.23e45' -- (e notation can only occur when processing an input value). -- The text has no sign (caller inserts that later, if necessary). -- Separator is inserted only in the integer part of the significand -- (not after the decimal mark, and not after 'e' or 'E'). if parms.opt_nocomma or numsep == '' then return from_en(text) end local last = text:match('()[.eE]') -- () returns position if last == nil then last = #text else last = last - 1 -- index of last character before dot/e/E end if last < 4 or (last == 4 and parms.opt_comma5) then return from_en(text) end local groups = digit_grouper(group_method, parms.opt_gaps) local i = last while i > 0 do local position = groups:next_position(i) groups:add(text:sub(position+1, i)) i = position end return groups:join(text:sub(last+1)) end -- Input values can use values like 1.23e12, but are never displayed -- using scientific notation like 1.23×10¹². -- Very small or very large output values use scientific notation. -- Use format(fmtpower, significand, '10', exponent) where each arg is a string. local fmtpower = '%s<span style="margin:0 .15em 0 .25em">×</span>%s<sup>%s</sup>' local function with_exponent(show, exponent) -- Return wikitext to display the implied value in scientific notation. -- Input uses en digits; output uses digits in local language. if #show > 1 then show = show:sub(1, 1) .. '.' .. show:sub(2) end return format(fmtpower, from_en(show), from_en('10'), use_minus(from_en(tostring(exponent)))) end local function make_sigfig(value, sigfig) -- Return show, exponent that are equivalent to the result of -- converting the number 'value' (where value >= 0) to a string, -- rounded to 'sigfig' significant figures. -- The returned items are: -- show: a string of digits; no sign and no dot; -- there is an implied dot before show. -- exponent: a number (an integer) to shift the implied dot. -- Resulting value = tonumber('.' .. show) * 10^exponent. -- Examples: -- make_sigfig(23.456, 3) returns '235', 2 (.235 * 10^2). -- make_sigfig(0.0023456, 3) returns '235', -2 (.235 * 10^-2). -- make_sigfig(0, 3) returns '000', 1 (.000 * 10^1). if sigfig <= 0 then sigfig = 1 elseif sigfig > maxsigfig then sigfig = maxsigfig end if value == 0 then return string.rep('0', sigfig), 1 end local exp, frac = math.modf(log10(value)) if frac >= 0 then frac = frac - 1 exp = exp + 1 end local digits = format('%.0f', 10^(frac + sigfig)) if #digits > sigfig then -- Overflow (for sigfig=3: like 0.9999 rounding to "1000"; need "100"). digits = digits:sub(1, sigfig) exp = exp + 1 end assert(#digits == sigfig, 'Bug: rounded number has wrong length') return digits, exp end local function format_number(parms, show, exponent, isnegative) -- Parameter show is a number in en digits and with '.' decimal mark. -- Return t where t is a table with fields: -- show = wikitext formatted to display implied value -- (digits in local language) -- is_scientific = true if show uses scientific notation -- clean = unformatted show (possibly adjusted and with inserted '.') -- (en digits) -- sign = '' or MINUS -- exponent = exponent (possibly adjusted) -- The clean and exponent fields can be used to calculate the -- rounded absolute value, if needed. -- -- The value implied by the arguments is found from: -- exponent is nil; and -- show is a string of digits (no sign), with an optional dot; -- show = '123.4' is value 123.4, '1234' is value 1234.0; -- or: -- exponent is an integer indicating where dot should be; -- show is a string of digits (no sign and no dot); -- there is an implied dot before show; -- show does not start with '0'; -- show = '1234', exponent = 3 is value 0.1234*10^3 = 123.4. -- -- The formatted result: -- * Is for an output value and is spelled if wanted and possible. -- * Includes a Unicode minus if isnegative. -- * Uses a custom decimal mark, if wanted. -- * Has digits grouped where necessary, if wanted. -- * Uses scientific notation for very small or large values -- (which forces output to not be spelled). -- * Has no more than maxsigfig significant digits -- (same as old template and {{#expr}}). local sign = isnegative and MINUS or '' local maxlen = maxsigfig if exponent == nil then local integer, dot, fraction = show:match('^(%d*)(%.?)(.*)') if #integer >= 10 then show = integer .. fraction exponent = #integer elseif integer == '0' or integer == '' then local zeros, figs = fraction:match('^(0*)([^0]?.*)') if #figs == 0 then if #zeros > maxlen then show = '0.' .. zeros:sub(1, maxlen) end elseif #zeros >= 4 then show = figs exponent = -#zeros elseif #figs > maxlen then show = '0.' .. zeros .. figs:sub(1, maxlen) end else maxlen = maxlen + #dot if #show > maxlen then show = show:sub(1, maxlen) end end end if exponent then if #show > maxlen then show = show:sub(1, maxlen) end if exponent > 10 or exponent <= -4 or (exponent == 10 and show ~= '1000000000') then -- Rounded value satisfies: value >= 1e9 or value < 1e-4 (1e9 = 0.1e10). return { clean = '.' .. show, exponent = exponent, sign = sign, show = sign .. with_exponent(show, exponent-1), is_scientific = true, } end if exponent >= #show then show = show .. string.rep('0', exponent - #show) -- result has no dot elseif exponent <= 0 then show = '0.' .. string.rep('0', -exponent) .. show else show = show:sub(1, exponent) .. '.' .. show:sub(exponent+1) end end if isnegative and show:match('^0.?0*$') then sign = '' -- don't show minus if result is negative but rounds to zero end local formatted_show = sign .. with_separator(parms, show) if parms.opt_spell_out then formatted_show = spell_number(parms, sign .. show) or formatted_show end return { clean = show, sign = sign, show = formatted_show, } end -- Fraction output format. -- 2013-07-20 Trying new styles proposed at [[Template talk:Convert]]. local fracfmt = { { -- Like {{frac}} (fraction slash). -- 1/2 : sign, numerator, denominator -- 1+2/3 : signed_wholenumber, numerator, denominator '<span class="frac nowrap">%s<sup>%s</sup>&frasl;<sub>%s</sub></span>', '<span class="frac nowrap">%s<sup> %s</sup>&frasl;<sub>%s</sub></span>', }, { -- Like {{sfrac}} (fraction horizontal bar). -- 1//2 : sign, numerator, denominator (sign should probably be before the fraction, but then it can wrap, and html is already too long) -- 1+2//3 : signed_wholenumber, numerator, denominator '<span class="sfrac nowrap" style="display:inline-block; vertical-align:-0.5em; font-size:85%%; text-align:center;"><span style="display:block; line-height:1em; padding:0 0.1em;">%s%s</span><span style="display:none;">/</span><span style="display:block; line-height:1em; padding:0 0.1em; border-top:1px solid;">%s</span></span>', '<span class="sfrac nowrap">%s<span style="display:none;">&nbsp;</span><span style="display:inline-block; vertical-align:-0.5em; font-size:85%%; text-align:center;"><span style="display:block; line-height:1em; padding:0 0.1em;">%s</span><span style="display:none;">/</span><span style="display:block; line-height:1em; padding:0 0.1em; border-top:1px solid;">%s</span></span></span>', }, { -- Like old {{convert}} template. -- 1///2 : sign, numerator, denominator -- 1+2///3: signed_wholenumber, sign, numerator, denominator '<span style="white-space:nowrap">%s<sup>%s</sup>&frasl;<sub>%s</sub></span>', '<span class="frac nowrap">%s<s style="display:none">%s</s><sup>%s</sup>&frasl;<sub>%s</sub></span>', }, } local function extract_fraction(parms, text, negative) -- If text represents a fraction, return value, show, spelled where -- value is a number (value of the fraction in argument text) -- show is a string (formatted text for display of an input value, -- and is spelled if wanted and possible) -- spelled is true if show was spelled -- Otherwise, return nil. -- Input uses en digits and '.' decimal mark (input has been translated). -- Output uses digits in local language and custom decimal mark, if any. -- -- In the following, '(3/8)' represents the wikitext required to -- display a fraction with numerator 3 and denominator 8. -- In the wikitext, Unicode minus is used for a negative value. -- text value, show value, show -- if not negative if negative -- 3 / 8 0.375, '(3/8)' -0.375, '−(3/8)' -- 2 + 3 / 8 2.375, '2(3/8)' -1.625, '−2(−3/8)' -- 2 - 3 / 8 1.625, '2(−3/8)' -2.375, '−2(3/8)' -- 1 + 20/8 3.5 , '1/(20/8)' 1.5 , '−1/(−20/8)' -- 1 - 20/8 -1.5., '1(−20/8)' -3.5 , '−1(20/8)' -- Wherever an integer appears above, numbers like 1.25 or 12.5e-3 -- (which may be negative) are also accepted (like old template). -- Template interprets '1.23e+2+12/24' as '123(12/24)' = 123.5! local numstr, whole, value local lhs, slash, denstr = text:match('^%s*([^/]-)%s*(/+)%s*(.-)%s*$') local denominator = tonumber(denstr) if denominator == nil then return nil end local wholestr, negfrac, rhs = lhs:match('^%s*(.-[^eE])%s*([+-])%s*(.-)%s*$') if wholestr == nil or wholestr == '' then wholestr = nil whole = 0 numstr = lhs else whole = tonumber(wholestr) if whole == nil then return nil end numstr = rhs end negfrac = (negfrac == '-') local numerator = tonumber(numstr) if numerator == nil then return nil end -- Spelling of silly inputs like "-2+3/8" or "2+3/+8" (mixed or excess signs) is not supported. local do_spell if negative == negfrac or wholestr == nil then value = whole + numerator / denominator do_spell = parms.opt_spell_in if do_spell then if not (numstr:match('^%d') and denstr:match('^%d')) then -- if either has a sign do_spell = false end end else value = whole - numerator / denominator numstr = change_sign(numstr) do_spell = false end if not valid_number(value) then return nil -- overflow or similar end numstr = use_minus(numstr) denstr = use_minus(denstr) local style = #slash -- kludge: 1, 2, or 3 slashes can be used to select style if style > 3 then style = 3 end local wikitext if wholestr then if negative then wholestr = change_sign(wholestr) end local fmt = fracfmt[style][2] if style < 3 then wikitext = format(fmt, use_minus(from_en(wholestr)), from_en(numstr), from_en(denstr)) else local sign = negative and MINUS or '+' wikitext = format(fmt, use_minus(from_en(wholestr)), sign, from_en(numstr), from_en(denstr)) end else local sign = negative and MINUS or '' wikitext = format(fracfmt[style][1], sign, from_en(numstr), from_en(denstr)) end if do_spell then local numsign = (wholestr or not negative) and '' or '-' wikitext = spell_number(parms, wholestr, numsign .. numstr, denstr) or wikitext end return value, wikitext, do_spell end local function extract_number(parms, text, another, no_fraction) -- Return true, info if can extract a number from text, -- where info is a table with the result, -- or return false, t where t is an error message table. -- Input can use en digits or digits in local language. -- Parameter another = true if the expected value is not the first. -- Before processing, the input text is cleaned: -- * Any thousand separators (valid or not) are removed. -- * Any sign (and optional following whitespace) is replaced with -- '-' (if negative) or '' (otherwise). -- That replaces Unicode minus with '-'. -- If successful, the returned info table contains named fields: -- value = a valid number -- singular = true if value is 1 (to use singular form of units) -- = false if value is -1 (like old template) -- clean = cleaned text with any separators and sign removed -- (en digits and '.' decimal mark) -- show = text formatted for output -- (digits in local language and custom decimal mark) -- The resulting show: -- * Is for an input value and is spelled if wanted and possible. -- * Has a rounded value, if wanted. -- * Has digits grouped where necessary, if wanted. -- * If negative, a Unicode minus is used; otherwise the sign is -- '+' (if the input text used '+'), or is '' (if no sign in input). text = strip(text or '') local clean = to_en(text) if clean == '' then return false, { another and 'cvt_no_num2' or 'cvt_no_num' } end local isnegative, propersign = false, '' -- most common case local singular, show local value = tonumber(clean) if value then local sign = clean:sub(1, 1) if sign == '+' or sign == '-' then propersign = (sign == '+') and '+' or MINUS clean = clean:sub(2) end if value < 0 then isnegative = true value = -value end else local valstr for _, prefix in ipairs({ '-', MINUS, '&minus;' }) do -- Including '-' means inputs like '- 2' (with space) are accepted as -2. -- It also sets isnegative in case input is a fraction like '-2-3/4'. local plen = #prefix if clean:sub(1, plen) == prefix then valstr = clean:sub(plen + 1) break end end if valstr then isnegative = true propersign = MINUS clean = valstr value = tonumber(clean) end if value == nil then local spelled if not no_fraction then value, show, spelled = extract_fraction(parms, clean, isnegative) end if value == nil then return false, { 'cvt_bad_num', text } end if spelled and value <= 1 then singular = true -- for example, "one half mile" (singular unit) else singular = false -- any numeric fraction (even with value 1) is regarded as plural end end end if not valid_number(value) then -- for example, "1e310" overflows return false, { 'cvt_invalid_num' } end if show == nil then singular = (value == 1 and not isnegative) local precision = parms.input_precision if precision and 0 <= precision and precision <= 8 then value = value + 2e-14 -- fudge for some common cases of bad rounding local fmt = '%.' .. format('%d', precision) .. 'f' show = fmt:format(value) else show = clean end show = propersign .. with_separator(parms, show) if parms.opt_spell_in then show = spell_number(parms, propersign .. clean) or show end end if isnegative and (value ~= 0) then value = -value end return true, { value = value, singular = singular, clean = clean, show = show, } end local function get_number(text) -- Return v, f where: -- v = nil (text is not a number) -- or -- v = value of text (text is a number) -- f = true if value is an integer -- Input can use en digits or digits in local language, -- but no separators, no Unicode minus, and no fraction. if text then local number = tonumber(to_en(text)) if number then local integer, fraction = math.modf(number) return number, (fraction == 0) end end end local function preunits(count, preunit1, preunit2) -- If count is 1: -- ignore preunit2 -- return p1 -- else: -- preunit1 is used for preunit2 if the latter is empty -- return p1, p2 -- where: -- p1 is text to insert before the input unit -- p2 is text to insert before the output unit -- p1 or p2 may be nil to mean "no preunit" -- Using '+ ' gives output like "5+ feet" (no preceding space). local function withspace(text, i) -- Insert space at beginning if i == 1, or at end if i == -1. -- However, no space is inserted if there is a space or '&nbsp;' -- or '-' at that position ('-' is for adjectival text). local current = text:sub(i, i) if current == ' ' or current == '-' then return text end if i == 1 then current = text:sub(1, 6) else current = text:sub(-6, -1) end if current == '&nbsp;' then return text end if i == 1 then return ' ' .. text end return text .. ' ' end preunit1 = preunit1 or '' local trim1 = strip(preunit1) if count == 1 then if trim1 == '' then return nil end return withspace(withspace(preunit1, 1), -1) end preunit2 = preunit2 or '' local trim2 = strip(preunit2) if trim1 == '' and trim2 == '' then return nil, nil end if trim1 ~= '+' then preunit1 = withspace(preunit1, 1) end if trim2 == '&#32;' then -- trick to make preunit2 empty preunit2 = nil elseif trim2 == '' then preunit2 = preunit1 elseif trim2 ~= '+' then preunit2 = withspace(preunit2, 1) end return preunit1, preunit2 end local function range_text(range, want_name, parms, before, after) -- Return before .. rtext .. after -- where rtext is the text that separates two values in a range. local rtext, adj_text, exception if type(range) == 'table' then -- Table must specify range text for abbr=off and for abbr=on, -- and may specify range text for 'adj=on', -- and may specify exception = true. rtext = range[want_name and 'off' or 'on'] adj_text = range['adj'] exception = range['exception'] else rtext = range end if parms.opt_adjectival then if want_name or (exception and parms.abbr_org == 'on') then rtext = adj_text or rtext:gsub(' ', '-'):gsub('&nbsp;', '-') end end if rtext == '–' and after:sub(1, #MINUS) == MINUS then rtext = '&nbsp;– ' end return before .. rtext .. after end local function get_composite(parms, iparm, total, in_unit_table) -- Look for a composite input unit. For example, "{{convert|1|yd|2|ft|3|in}}" -- would result in a call to this function with -- iparm = 3 (parms[iparm] = "2", just after the first unit) -- total = 1 (number of yards) -- in_unit_table = (unit table for "yd") -- Return true, iparm, unit where -- iparm = index just after the composite units (7 in above example) -- unit = composite unit table holding all input units, -- or return true if no composite unit is present in parms, -- or return false, t where t is an error message table. local default, subinfo local composite_units, count = { in_unit_table }, 1 local fixups = {} local subunit = in_unit_table while subunit.subdivs do -- subdivs is nil or a table of allowed subdivisions local subcode = strip(parms[iparm+1]) local subdiv = subunit.subdivs[subcode] if not subdiv then break end local success success, subunit = lookup(subcode, parms.opt_sp_us, 'no_combination') if not success then return false, subunit end -- should never occur success, subinfo = extract_number(parms, parms[iparm]) if not success then return false, subinfo end iparm = iparm + 2 subunit.inout = 'in' subunit.valinfo = { subinfo } -- Recalculate total as a number of subdivisions. -- subdiv[1] = number of subdivisions per previous unit (integer > 1). total = total * subdiv[1] + subinfo.value if not default then -- set by the first subdiv with a default defined default = subdiv.default end count = count + 1 composite_units[count] = subunit if subdiv.unit or subdiv.name then fixups[count] = { unit = subdiv.unit, name = subdiv.name, valinfo = subunit.valinfo } end end if count == 1 then return true -- no error and no composite unit end for i, fixup in pairs(fixups) do local unit = fixup.unit local name = fixup.name if not unit or (count > 2 and name) then composite_units[i].fixed_name = name else local success, alternate = lookup(unit, parms.opt_sp_us, 'no_combination') if not success then return false, alternate end -- should never occur alternate.inout = 'in' alternate.valinfo = fixup.valinfo composite_units[i] = alternate end end return true, iparm, { utype = in_unit_table.utype, scale = subunit.scale, -- scale of last (least significant) unit valinfo = { { value = total, clean = subinfo.clean } }, composite = composite_units, default = default or in_unit_table.default } end local function translate_parms(parms, named_keys) -- Update fields in parms by translating parameters to those used at enwiki. -- Also, checks are performed which may display warnings, if enabled. -- Return true if successful or return false, t where t is an error message table. for _, loc_name in ipairs(named_keys) do local loc_value = parms[loc_name] local en_name = en_option_name[loc_name] if en_name then local en_value if en_name == 'sigfig' then if loc_value == '' then add_warning(parms, 'cvt_empty_option', loc_name) else local number, is_integer = get_number(loc_value) if not number or not is_integer or number <= 0 then return false, { 'cvt_bad_sigfig', loc_value } end en_value = number end else en_value = en_option_value[en_name][loc_value] end if en_value == nil then if loc_value == '' then add_warning(parms, 'cvt_empty_option', loc_name) else -- Using, for example, aliases like |sing=off|adj=on can give -- loc_value == nil when adj is processed after sing. In that case, -- the following gives a slightly misleading but reasonable warning. local text = loc_value and (loc_name .. '=' .. loc_value) or loc_name add_warning(parms, 'cvt_unknown_option', text) end elseif en_value == '' then en_value = nil -- an ignored option like adj=off elseif type(en_value) == 'string' and en_value:sub(1, 4) == 'opt_' then for _, v in ipairs(split(en_value, ',')) do parms[v] = true end en_value = nil end parms[en_name] = en_value else add_warning(parms, 'cvt_unknown_option', loc_name .. '=' .. loc_value) end end if parms.adj then if parms.adj:sub(1, 2) == 'ri' then -- It is known that adj is 'ri1' or 'ri2' or 'ri3', so precision is valid. -- Only en digits are accepted. parms.input_precision = tonumber(parms.adj:sub(-1)) parms.adj = nil end end if parms.abbr then parms.abbr_org = parms.abbr -- original abbr that was set, before any flip else parms.abbr = 'out' -- default is to abbreviate output only (use symbol, not name) end if parms.opt_flip then local function swap_in_out(option) local value = parms[option] if value == 'in' then parms[option] = 'out' elseif value == 'out' then parms[option] = 'in' end end swap_in_out('abbr') swap_in_out('lk') if parms.opt_spell_in then -- For simplicity, and because it does not appear to be needed, -- user cannot set an option to spell the output. parms.opt_spell_in = nil parms.opt_spell_out = true end end if parms.opt_table or parms.opt_tablecen then if parms.abbr_org == nil and parms.lk == nil then parms.opt_values = true end local align = format('align="%s"', parms.opt_table and 'right' or 'center') parms.table_joins = { align .. '|', '\n|' .. align .. '|' } end if parms.opt_lang_en then from_en_table = nil end return true end local function get_values(parms) -- If successful, update parms and return true, v, i where -- v = table of input values -- i = index to next entry in parms after those processed here -- or return false, t where t is an error message table. local valinfo = collection() -- numbered table of input values local range = collection() -- numbered table of range items (having, for example, 2 range items requires 3 input values) local had_nocomma -- true if removed "nocomma" kludge from second parameter (like "tonocomma") local parm2 = strip(parms[2]) if parm2 and parm2:sub(-7, -1) == 'nocomma' then parms[2] = strip(parm2:sub(1, -8)) parms.opt_nocomma = true had_nocomma = true end local i = 1 while true do local success, info = extract_number(parms, parms[i], i > 1) -- need to set parms.opt_nocomma before calling this if not success then return false, info end i = i + 1 valinfo:add(info) local next = strip(parms[i]) local range_item = range_types[next] or range_types[range_aliases[next]] if not range_item then break end i = i + 1 range:add(range_item) parms.is_range_x = (type(range_item) == 'table') and range_item.is_range_x or nil end if range.n > 0 then if range.n > 30 then -- limit abuse, although 4 is a more likely upper limit return false, { 'cvt_invalid_num' } -- misleading message but it will do end parms.range = range elseif had_nocomma then return false, { 'cvt_unknown', parm2 } end return true, valinfo, i end local function get_parms(pframe) -- If successful, return true, parms, unit where -- parms is a table of all arguments passed to the template -- converted to named arguments, and -- unit is the input unit table; -- or return false, t where t is an error message table. -- MediaWiki removes leading and trailing whitespace from the values of -- named arguments. However, the values of numbered arguments include any -- whitespace entered in the template, and whitespace is used by some -- parameters (example: the numbered parameters associated with "disp=x"). local parms = {} -- arguments passed to template local named_keys = collection() -- numbered table of named keys in parms: needed because cannot iterate parms and add new fields to it for k, v in pairs(pframe.args) do parms[k] = v if type(k) == 'string' then named_keys:add(k) end end local success, msg = translate_parms(parms, named_keys) if not success then return false, msg end local success, valinfo, i = get_values(parms) if not success then return false, valinfo end local in_unit = strip(parms[i]) i = i + 1 local success, in_unit_table = lookup(in_unit, parms.opt_sp_us, 'no_combination') if not success then return false, in_unit_table end if parms.test == 'msg' then -- Am testing the messages produced when no output unit is specified, and -- the input unit has a missing or invalid default. -- Set two units for testing that. -- LATER: Remove this code. if in_unit == 'chain' then in_unit_table.default = nil -- no default elseif in_unit == 'rd' then in_unit_table.default = "ft!X!m" -- an invalid expression end end in_unit_table.valinfo = valinfo in_unit_table.inout = 'in' -- this is an input unit if not parms.range then local success, inext, composite_unit = get_composite(parms, i, valinfo[1].value, in_unit_table) if not success then return false, inext end if composite_unit then in_unit_table = composite_unit i = inext end end if in_unit_table.builtin == 'mach' then -- As with old template, a number following Mach as the input unit is the altitude, -- and there is no way to specify an altitude for the output unit. -- Could put more code in this function to get any output unit and check for -- an altitude following that unit. local success, info = extract_number(parms, parms[i], false, true) if success then i = i + 1 in_unit_table.altitude = info.value end end local next = strip(parms[i]) i = i + 1 local precision, is_bad_precision local function set_precision(text) local number, is_integer = get_number(text) if number then if is_integer then precision = number else precision = text is_bad_precision = true end return true -- text was used for precision, good or bad end end if not set_precision(next) then parms.out_unit = next if set_precision(strip(parms[i])) then i = i + 1 end end if parms.opt_adj_mid then parms.opt_adjectival = true next = parms[i] i = i + 1 if next then -- mid-text words if next:sub(1, 1) == '-' then parms.mid = next else parms.mid = ' ' .. next end end end if parms.opt_one_preunit then parms[parms.opt_flip and 'preunit2' or 'preunit1'] = preunits(1, parms[i]) i = i + 1 end if parms.disp == 'x' then -- Following is reasonably compatible with the old template. local first = parms[i] or '' local second = parms[i+1] or '' i = i + 2 if strip(first) == '' then -- user can enter '&#32;' rather than ' ' to avoid the default first = ' [&nbsp;' .. first second = '&nbsp;]' .. second end parms.joins = { first, second } elseif parms.opt_two_preunits then local p1, p2 = preunits(2, parms[i], parms[i+1]) i = i + 2 if parms.preunit1 then -- To simplify documentation, allow unlikely use of adj=pre with disp=preunit -- (however, an output unit must be specified with adj=pre and with disp=preunit). parms.preunit1 = parms.preunit1 .. p1 parms.preunit2 = p2 else parms.preunit1, parms.preunit2 = p1, p2 end end if precision == nil then if set_precision(strip(parms[i])) then i = i + 1 end end if is_bad_precision then return false, { 'cvt_bad_prec', precision } end parms.precision = precision return true, parms, in_unit_table end local function default_precision(invalue, inclean, outvalue, in_current, out_current, extra) -- Return a default value for precision (an integer like 2, 0, -2). -- Code follows procedures used in old template. local fudge = 1e-14 -- {{Order of magnitude}} adds this, so we do too local prec, minprec, adjust local utype = out_current.utype local subunit_ignore_trailing_zero local subunit_more_precision -- kludge for "in" used in input like "|2|ft|6|in" local composite = in_current.composite if composite then subunit_ignore_trailing_zero = true -- input "|2|st|10|lb" has precision 0, not -1 if composite[#composite].exception == 'subunit_more_precision' then subunit_more_precision = true -- do not use standard precision with input like "|2|ft|6|in" end end -- Count digits after decimal mark, handling cases like '12.345e6'. local exponent local integer, dot, fraction, expstr = inclean:match('^(%d*)(%.?)(%d*)(.*)') local e = expstr:sub(1, 1) local boost = 0 -- can increase default precision if e == 'e' or e == 'E' then exponent = tonumber(expstr:sub(2)) elseif expstr:find('/', 1, true) then boost = 1 -- any input fraction is regarded as one extra digit of precision end if dot == '' then prec = subunit_ignore_trailing_zero and 0 or -integer:match('0*$'):len() else prec = #fraction end if exponent then -- So '1230' and '1.23e3' both give prec = -1, and '0.00123' and '1.23e-3' give 5. prec = prec - exponent end local exception = (utype == 'temperature' and not (in_current.exception == 'temperature' or out_current.exception == 'temperature')) if exception then -- Kelvin value can be almost zero, or small but negative due to precision problems. -- Also, an input value like -300 C (below absolute zero) gives negative kelvins. -- Calculate minimum precision from absolute value. adjust = 0 local kelvin = abs((invalue - in_current.offset) * in_current.scale) if kelvin < 1e-8 then -- assume nonzero due to input or calculation precision problem minprec = 2 else minprec = 2 - floor(log10(kelvin) + fudge) -- 3 sigfigs in kelvin end else if invalue == 0 or outvalue <= 0 then -- We are never called with a negative outvalue, but it might be zero. -- This is special-cased to avoid calculation exceptions. return 0 end if out_current.exception == 'integer_more_precision' and floor(invalue) == invalue then -- With certain output units that sometimes give poor results -- with default rounding, use more precision when the input -- value is equal to an integer. An example of a poor result -- is when input 50 gives a smaller output than input 49.5. -- Experiment shows this helps, but it does not eliminate all -- surprises because it is not clear whether "50" should be -- interpreted as "from 45 to 55" or "from 49.5 to 50.5". adjust = -log10(in_current.scale) elseif subunit_more_precision then -- Conversion like "{{convert|6|ft|1|in|cm}}" (where subunit is "in") -- has a non-standard adjust value, to give more output precision. adjust = log10(out_current.scale) + 2 else adjust = log10(abs(invalue / outvalue)) end adjust = adjust + log10(2) -- Ensure that the output has at least two significant figures. minprec = 1 - floor(log10(outvalue) + fudge) end if extra then adjust = extra.adjust or adjust minprec = extra.minprec or minprec end return math.max(floor(prec + adjust + boost), minprec) end local function convert(invalue, inclean, in_current, out_current) -- Convert given input value from one unit to another. -- Return output_value (a number) if a simple convert, or -- return f, t where -- f = true, t = table of information with results, or -- f = false, t = error message table. local inscale = in_current.scale local outscale = out_current.scale if not in_current.iscomplex and not out_current.iscomplex then return invalue * (inscale / outscale) -- minimize overhead for most common case end if in_current.invert then -- Fuel efficiency (there are no built-ins for this type of unit). if in_current.invert * out_current.invert < 0 then return 1 / (invalue * inscale * outscale) end return invalue * (inscale / outscale) elseif in_current.offset then -- Temperature (there are no built-ins for this type of unit). return (invalue - in_current.offset) * (inscale / outscale) + out_current.offset else -- Built-in unit. local in_builtin = in_current.builtin local out_builtin = out_current.builtin if in_builtin and out_builtin then if in_builtin == out_builtin then return invalue end -- There are no cases (yet) where need to convert from one -- built-in unit to another, so this should never occur. return false, { 'cvt_bug_convert' } end if in_builtin == 'mach' or out_builtin == 'mach' then local adjust if in_builtin == 'mach' then inscale = speed_of_sound(in_current.altitude) adjust = outscale / 0.1 else outscale = speed_of_sound(out_current.altitude) adjust = 0.1 / inscale end return true, { outvalue = invalue * (inscale / outscale), adjust = log10(adjust) + log10(2), } elseif in_builtin == 'hand' then -- 1 hand = 4 inches; 1.2 hands = 6 inches. -- Fractions of a hand are only defined for the first digit, and -- the first fractional digit should be a number of inches (1, 2 or 3). -- However, this code interprets the entire fraction as the number -- of inches / 10 (so 1.75 inches would be 0.175 hands). -- A value like 12.3 hands is exactly 12*4 + 3 inches; base default precision on that. local integer, fraction = math.modf(invalue) local outvalue = (integer + 2.5 * fraction) * (inscale / outscale) local inch_value = 4 * integer + 10 * fraction -- equivalent number of inches local fracstr = inclean:match('%.(.*)') or '' local fmt if fracstr == '' then fmt = '%.0f' else fmt = '%.' .. format('%d', #fracstr - 1) .. 'f' end return true, { invalue = inch_value, inclean = format(fmt, inch_value), outvalue = outvalue, minprec = 0, } end end return false, { 'cvt_bug_convert' } -- should never occur end local function cvtround(parms, info, in_current, out_current) -- Return true, t where t is a table with the conversion results; fields: -- show = rounded, formatted string with the result of converting value in info, -- using the rounding specified in parms. -- singular = true if result is positive, and (after rounding) -- is "1", or like "1.00"; -- (and more fields shown below, and a calculated 'absvalue' field). -- or return true, nil if no value specified; -- or return false, t where t is an error message table. -- Input info.clean uses en digits (it has been translated, if necessary). -- Output show uses en or non-en digits as appropriate, or can be spelled. local invalue, inclean, show, exponent, singular if info then invalue, inclean = info.value, info.clean end if invalue == nil or invalue == '' then return true, nil end if out_current.builtin == 'hand' then -- Convert to hands, then convert the fractional part to inches. -- Code is not correct when output is spelled, and it ignores any requested -- precision if the output uses scientific notation (very large, or very -- small). Not worth more complexity as these cases should be very rare. local dummy_unit_table = { scale = out_current.scale } local success, outinfo = cvtround(parms, info, in_current, dummy_unit_table) if not success then return false, outinfo end local fmt if outinfo.is_scientific then fmt = '%.1f' else local fraction = (outinfo.show):match('[' .. numdot .. '](.*)') or '' -- outinfo.show is in local language if fraction == '' then if not outinfo.use_default_precision then return true, outinfo end fmt = '%.0f' else fmt = '%.' .. format('%d', ulen(fraction) - 1) .. 'f' end end local hands, inches = math.modf(outinfo.raw_absvalue) inches = format(fmt, inches * 4) if inches:sub(1, 1) == '4' then hands = hands + 1 inches = '0' .. inches:sub(2) if tonumber(inches) == 0 then inches = '0' end end if inches:sub(2, 2) == '.' then inches = inches:sub(1, 1) .. inches:sub(3) end return true, { sign = outinfo.sign, singular = outinfo.singular, show = outinfo.sign .. with_separator(parms, format('%d', hands)) .. numdot .. from_en(inches) } end local outvalue, extra = convert(invalue, inclean, in_current, out_current) if extra then if not outvalue then return false, extra end invalue = extra.invalue or invalue inclean = extra.inclean or inclean outvalue = extra.outvalue end if not valid_number(outvalue) then return false, { 'cvt_invalid_num' } end local isnegative if outvalue < 0 then isnegative = true outvalue = -outvalue end local success, use_default_precision local precision = parms.precision if not precision then local sigfig = parms.sigfig if sigfig then show, exponent = make_sigfig(outvalue, sigfig) elseif parms.opt_round5 then show = format('%.0f', floor((outvalue / 5) + 0.5) * 5) else use_default_precision = true precision = default_precision(invalue, inclean, outvalue, in_current, out_current, extra) end end if precision then if precision >= 0 then if precision <= 8 then -- Add a fudge to handle common cases of bad rounding due to inability -- to precisely represent some values. This makes the following work: -- {{convert|-100.1|C|K}} and {{convert|5555000|um|m|2}}. -- Old template uses #expr round, which invokes PHP round(). -- LATER: Investigate how PHP round() works. outvalue = outvalue + 2e-14 end local fmt = '%.' .. format('%d', precision) .. 'f' local success success, show = pcall(format, fmt, outvalue) if not success then return false, { 'cvt_big_prec', tostring(precision) } end else precision = -precision -- #digits to zero (in addition to any digits after dot) local shift = 10 ^ precision show = format('%.0f', outvalue/shift) if show ~= '0' then exponent = #show + precision end end end if (show == '1' or show:match('^1%.0*$') ~= nil) and not isnegative then -- Use match because on some systems 0.99999999999999999 is 1.0. singular = true end local t = format_number(parms, show, exponent, isnegative) t.singular = singular t.raw_absvalue = outvalue -- absolute value before rounding t.use_default_precision = use_default_precision return true, setmetatable(t, { __index = function (self, key) if key == 'absvalue' then -- Calculate absolute value after rounding, if needed. local clean, exponent = rawget(self, 'clean'), rawget(self, 'exponent') local value = tonumber(clean) -- absolute value (any negative sign has been ignored) if exponent then value = value * 10^exponent end rawset(self, key, value) return value end end }) end local function evaluate_condition(value, condition) -- Return true or false from applying a conditional expression to value, -- or throw an error if invalid. -- A very limited set of expressions is supported: -- v < 9 -- v * 9 < 9 -- where -- 'v' is replaced with value -- 9 is any number (as defined by Lua tonumber) -- only en digits are accepted -- '<' can also be '<=' or '>' or '>=' -- In addition, the following form is supported: -- LHS and RHS -- where -- LHS, RHS = any of above expressions. local function compare(value, text) local arithop, factor, compop, limit = text:match('^%s*v%s*([*]?)(.-)([<>]=?)(.*)$') if arithop == nil then error('Invalid default expression', 0) elseif arithop == '*' then factor = tonumber(factor) if factor == nil then error('Invalid default expression', 0) end value = value * factor end limit = tonumber(limit) if limit == nil then error('Invalid default expression', 0) end if compop == '<' then return value < limit elseif compop == '<=' then return value <= limit elseif compop == '>' then return value > limit elseif compop == '>=' then return value >= limit end error('Invalid default expression', 0) -- should not occur end local lhs, rhs = condition:match('^(.-%W)and(%W.*)') if lhs == nil then return compare(value, condition) end return compare(value, lhs) and compare(value, rhs) end local function get_default(value, unit_table) -- Return true, s where s = name of unit's default output unit, -- or return false, t where t is an error message table. -- Some units have a default that depends on the input value -- (the first value if a range of values is used). -- If '!' is in the default, the first bang-delimited field is an -- expression that uses 'v' to represent the input value. -- Example: 'v < 120 ! small ! big ! suffix' (suffix is optional) -- evaluates 'v < 120' as a boolean with result -- 'smallsuffix' if (value < 120), or 'bigsuffix' otherwise. -- Input must use en digits and '.' decimal mark. local default = default_exceptions[unit_table.defkey or unit_table.symbol] or unit_table.default if default == nil then return false, { 'cvt_no_default', unit_table.symbol } end if default:find('!', 1, true) == nil then return true, default end local t = split(default, '!') if #t == 3 or #t == 4 then local success, result = pcall(evaluate_condition, value, t[1]) if success then default = result and t[2] or t[3] if #t == 4 then default = default .. t[4] end return true, default end end return false, { 'cvt_bad_default', unit_table.symbol } end local linked_pages -- to record linked pages so will not link to the same page more than once local function make_link(link, id, link_key) -- Return wikilink "[[link|id]]", possibly abbreviated as in examples: -- [[Mile|mile]] --> [[mile]] -- [[Mile|miles]] --> [[mile]]s -- However, just id is returned if: -- * no link given (so caller does not need to check if a link was defined); or -- * link has previously been used during the current convert (to avoid overlinking). -- Linking with a unit uses the unit table as the link key, which fails to detect -- overlinking for conversions like (each links "mile" twice): -- {{convert|1|impgal/mi|USgal/mi|lk=on}} -- {{convert|1|l/km|impgal/mi USgal/mi|lk=on}} link_key = link_key or link -- use key if given (the key, but not the link, may be known when need to cancel a link record) if link == nil or link == '' or linked_pages[link_key] then return id end linked_pages[link_key] = true -- Following only works for language en, but it should be safe on other wikis, -- and overhead of doing it generally does not seem worthwhile. local l = link:sub(1, 1):lower() .. link:sub(2) if link == id or l == id then return '[[' .. id .. ']]' elseif link .. 's' == id or l .. 's' == id then return '[[' .. id:sub(1, -2) .. ']]s' else return '[[' .. link .. '|' .. id .. ']]' end end local function linked_id(unit_table, key_id, want_link) -- Return final unit id (symbol or name), optionally with a wikilink, -- and update unit_table.sep if required. -- key_id is one of: 'symbol', 'sym_us', 'name1', 'name1_us', 'name2', 'name2_us'. local abbr_on = (key_id == 'symbol' or key_id == 'sym_us') if abbr_on and want_link then local symlink = rawget(unit_table, 'symlink') if symlink then return symlink -- for exceptions that have the linked symbol built-in end end local multiplier = rawget(unit_table, 'multiplier') local per = unit_table.per if per then local unit1 = per[1] -- top unit_table, or nil local unit2 = per[2] -- bottom unit_table if abbr_on then if not unit1 then unit_table.sep = '' -- no separator in "$2/acre" end if not want_link then local symbol = unit_table.symbol_raw if symbol then return symbol -- for exceptions that have the symbol built-in end end end local key_id2 -- unit2 is always singular if key_id == 'name2' then key_id2 = 'name1' elseif key_id == 'name2_us' then key_id2 = 'name1_us' else key_id2 = key_id end local result if abbr_on then result = '/' elseif unit1 then result = ' per ' else result = 'per ' end if unit1 then result = linked_id(unit1, key_id, want_link) .. result end return result .. linked_id(unit2, key_id2, want_link) end if multiplier then -- A multiplier (like "100" in "100km") forces the unit to be plural. if abbr_on then multiplier = multiplier .. '&nbsp;' else multiplier = multiplier .. ' ' if key_id == 'name1' then key_id = 'name2' elseif key_id == 'name1_us' then key_id = 'name2_us' end end else multiplier = '' end local id = unit_table.fixed_name or unit_table[key_id] if want_link then local link = link_exceptions[unit_table.symbol] or unit_table.link if link then local before = '' local i = unit_table.customary if i == 1 and unit_table.sp_us then i = 2 -- show "U.S." not "US" end if i == 3 and abbr_on then i = 4 -- abbreviate "imperial" to "imp" end local customary = customary_units[i] if customary then -- LATER: This works for language en only, but it's esoteric so ignore for now. local pertext if id:sub(1, 1) == '/' then -- Want unit "/USgal" to display as "/U.S. gal", not "U.S. /gal". pertext = '/' id = id:sub(2) elseif id:sub(1, 4) == 'per ' then -- Similarly want "per U.S. gallon", not "U.S. per gallon" (but in practice this is unlikely to be used). pertext = 'per ' id = id:sub(5) else pertext = '' end -- Omit any "US"/"U.S."/"imp"/"imperial" from start of id since that will be inserted. local removes = (i < 3) and { 'US&nbsp;', 'US ', 'U.S.&nbsp;', 'U.S. ' } or { 'imp&nbsp;', 'imp ', 'imperial ' } for _, prefix in ipairs(removes) do local plen = #prefix if id:sub(1, plen) == prefix then id = id:sub(plen + 1) break end end before = pertext .. make_link(customary.link, customary[1]) .. ' ' end id = before .. make_link(link, id, unit_table) end end return multiplier .. id end local function make_id(parms, which, unit_table) -- Return id, f where -- id = unit name or symbol, possibly modified -- f = true if id is a name, or false if id is a symbol -- using 1st or 2nd values (which), and for 'in' or 'out' (unit_table.inout). -- Result is '' if no symbol/name is to be used. -- In addition, set unit_table.sep = ' ' or '&nbsp;' or '' -- (the separator that caller will normally insert before the id). if parms.opt_values then unit_table.sep = '' return '' end local inout = unit_table.inout local valinfo = unit_table.valinfo local abbr_org = parms.abbr_org local adjectival = parms.opt_adjectival local disp = parms.disp local lk = parms.lk local usename = unit_table.usename local singular = valinfo[which].singular if usename then -- Old template does something like this. if lk == 'on' or lk == inout then -- A linked unit uses the standard singular. else -- Set non-standard singular. local flipped = parms.opt_flip if inout == 'in' then if not adjectival and (abbr_org == 'out' or flipped) then local value = valinfo[which].value singular = (0 < value and value < 1.0001) end else if (abbr_org == 'on') or (not flipped and (abbr_org == nil or abbr_org == 'out')) or (flipped and abbr_org == 'in') then singular = (valinfo[which].absvalue < 1.0001 and not valinfo[which].is_scientific) end end end end local want_name if usename then want_name = true else if abbr_org == nil then if disp == 'br' or disp == 'or' or disp == 'slash' then want_name = true end if unit_table.utype == 'temperature' or unit_table.utype == 'temperature change' then if not (unit_table.exception == 'temperature') then want_name = false end end end if want_name == nil then local abbr = parms.abbr if abbr == 'on' or abbr == inout or (abbr == 'mos' and inout == 'out') then want_name = false else want_name = true end end end local key if want_name then if parms.opt_use_nbsp then unit_table.sep = '&nbsp;' else unit_table.sep = ' ' end if parms.opt_singular then local value if inout == 'in' then value = valinfo[which].value else value = valinfo[which].absvalue end if value then -- some unusual units do not always set value field value = abs(value) singular = (0 < value and value < 1.0001) end end if unit_table.engscale or parms.is_range_x then -- engscale: so "|1|e3kg" gives "1 thousand kilograms" (plural) -- is_range_x: so "|0.5|x|0.9|mi" gives "0.5 by 0.9 miles" (plural) singular = false end key = (adjectival or singular) and 'name1' or 'name2' if unit_table.sp_us then key = key .. '_us' end else unit_table.sep = '&nbsp;' key = unit_table.sp_us and 'sym_us' or 'symbol' end return linked_id(unit_table, key, lk == 'on' or lk == inout), want_name end local function decorate_value(parms, unit_table, which) -- If needed, update unit_table so values will be shown with extra information. -- For consistency with the old template (but different from fmtpower), -- the style to display powers of 10 includes "display:none" to allow some -- browsers to copy, for example, "10³" as "10^3", rather than as "103". local engscale = unit_table.engscale if engscale then local inout = unit_table.inout local info = unit_table.valinfo[which] local abbr = parms.abbr if abbr == 'on' or abbr == inout then info.show = info.show .. '<span style="margin-left:0.2em">×<span style="margin-left:0.1em">' .. from_en('10') .. '</span></span><s style="display:none">^</s><sup>' .. from_en(tostring(engscale.exponent)) .. '</sup>' else local number_id local lk = parms.lk if lk == 'on' or lk == inout then number_id = make_link(engscale.link, engscale[1]) else number_id = engscale[1] end -- WP:NUMERAL recommends "&nbsp;" in values like "12 million". info.show = info.show .. (parms.opt_adjectival and '-' or '&nbsp;') .. number_id end end local prefix = unit_table.vprefix if prefix then local info = unit_table.valinfo[which] info.show = prefix .. info.show end end local function process_input(parms, in_current) -- Processing required once per conversion. -- Return block of text to represent input (value/unit). if parms.opt_output_only or parms.opt_output_number_only or parms.opt_output_unit_only then parms.joins = { '', '' } return '' end local first_unit local composite = in_current.composite -- nil or table of units if composite then first_unit = composite[1] else first_unit = in_current end local id1, want_name = make_id(parms, 1, first_unit) local sep = first_unit.sep -- separator between value and unit, set by make_id local preunit = parms.preunit1 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_input_unit_only then parms.joins = { '', '' } if composite then local parts = { id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, (make_id(parms, 1, unit))) end end id1 = table.concat(parts, ' ') end if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end local abbr = parms.abbr local disp = parms.disp if disp == nil then -- special case for the most common setting parms.joins = disp_joins['b'] elseif disp ~= 'x' then -- Old template does this. if disp == 'slash' then if parms.abbr_org == nil then disp = 'slash-nbsp' elseif abbr == 'in' or abbr == 'out' then disp = 'slash-sp' else disp = 'slash-nosp' end elseif disp == 'sqbr' then if abbr == 'on' then disp = 'sqbr-nbsp' else disp = 'sqbr-sp' end end parms.joins = disp_joins[disp] or disp_joins['b'] end if parms.opt_also_symbol and not composite then local join1 = parms.joins[1] if join1 == ' (' or join1 == ' [' then parms.joins = { join1 .. first_unit[first_unit.sp_us and 'sym_us' or 'symbol'] .. ', ', parms.joins[2] } end end if in_current.builtin == 'mach' then local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = first_unit.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. local prefix2 = make_id(parms, 2, first_unit) .. '&nbsp;' result = range_text(range[1], want_name, parms, result, prefix2 .. valinfo[2].show) end return preunit .. result end if composite then -- Simplify: assume there is no range, and no decoration. local mid = '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival then if not parms.opt_flip then mid = parms.mid or '' end if want_name then sep1 = '-' sep2 = '-' end end local parts = { first_unit.valinfo[1].show .. sep1 .. id1 } for i, unit in ipairs(composite) do if i > 1 then table.insert(parts, unit.valinfo[1].show .. sep1 .. (make_id(parms, 1, unit))) end end return table.concat(parts, sep2) .. mid end local result, mos local range = parms.range if range then mos = (abbr == 'mos') if not (mos or (parms.is_range_x and not want_name)) then linked_pages[first_unit] = nil -- so the second and only id will be linked, if wanted end end local id = (range == nil) and id1 or make_id(parms, 2, first_unit) local extra, was_hyphenated = hyphenated_maybe(parms, want_name, sep, id, 'in') if mos and was_hyphenated then mos = false -- suppress repeat of unit in a range if linked_pages[first_unit] then linked_pages[first_unit] = nil id = make_id(parms, 2, first_unit) extra = hyphenated_maybe(parms, want_name, sep, id, 'in') end end local valinfo = first_unit.valinfo if range then if range.n == 1 then -- Like {{convert|1|x|2|ft}} (one range item; two values). -- Do what old template did. local sep1 = first_unit.sep if mos then decorate_value(parms, in_current, 1) decorate_value(parms, in_current, 2) result = valinfo[1].show .. sep1 .. id1 elseif parms.is_range_x and not want_name then if abbr == 'in' or abbr == 'on' then decorate_value(parms, in_current, 1) end decorate_value(parms, in_current, 2) result = valinfo[1].show .. sep1 .. id1 else if abbr == 'in' or abbr == 'on' then decorate_value(parms, in_current, 1) end decorate_value(parms, in_current, 2) result = valinfo[1].show end result = range_text(range[1], want_name, parms, result, valinfo[2].show) else -- Like {{convert|1|x|2|x|3|ft}} (two or more range items): simplify. decorate_value(parms, in_current, 1) result = valinfo[1].show for i = 1, range.n do decorate_value(parms, in_current, i+1) result = range_text(range[i], want_name, parms, result, valinfo[i+1].show) end end else decorate_value(parms, first_unit, 1) result = valinfo[1].show end return result .. preunit .. extra end local function process_one_output(parms, out_current) -- Processing required for each output unit. -- Return block of text to represent output (value/unit). local id1, want_name = make_id(parms, 1, out_current) local sep = out_current.sep -- set by make_id local preunit = parms.preunit2 if preunit then sep = '' -- any separator is included in preunit else preunit = '' end if parms.opt_output_unit_only then if want_name and parms.opt_adjectival then return preunit .. hyphenated(id1) end return preunit .. id1 end if out_current.builtin == 'mach' then local prefix = id1 .. '&nbsp;' local range = parms.range local valinfo = out_current.valinfo local result = prefix .. valinfo[1].show if range then -- For simplicity and because more not needed, handle one range item only. result = range_text(range[1], want_name, parms, result, prefix .. valinfo[2].show) end return preunit .. result end local result local range = parms.range if range then if not (parms.is_range_x and not want_name) then linked_pages[out_current] = nil -- so the second and only id will be linked, if wanted end end local id = (range == nil) and id1 or make_id(parms, 2, out_current) local extra = hyphenated_maybe(parms, want_name, sep, id, 'out') local valinfo = out_current.valinfo if range then if range.n == 1 then local sep1 = out_current.sep local abbr = parms.abbr if parms.is_range_x and not want_name then if abbr == 'out' or abbr == 'on' then decorate_value(parms, out_current, 1) end decorate_value(parms, out_current, 2) result = valinfo[1].show .. sep1 .. id1 else if abbr == 'out' or abbr == 'on' then decorate_value(parms, out_current, 1) end decorate_value(parms, out_current, 2) result = valinfo[1].show end result = range_text(range[1], want_name, parms, result, valinfo[2].show) else -- Like {{convert|1|x|2|x|3|ft}} (two or more range items): simplify. decorate_value(parms, out_current, 1) result = valinfo[1].show for i = 1, range.n do decorate_value(parms, out_current, i+1) result = range_text(range[i], want_name, parms, result, valinfo[i+1].show) end end else decorate_value(parms, out_current, 1) result = valinfo[1].show end if parms.opt_output_number_only then return result end return result .. preunit .. extra end local function make_output_single(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for a single output (which is not a combination or a multiple); -- or return false, t where t is an error message table. out_unit_table.valinfo = collection() local range = parms.range for i = 1, (range and (range.n + 1) or 1) do local success, info = cvtround(parms, in_unit_table.valinfo[i], in_unit_table, out_unit_table) if not success then return false, info end out_unit_table.valinfo:add(info) end return true, process_one_output(parms, out_unit_table) end local function make_output_multiple(parms, in_unit_table, out_unit_table) -- Return true, item where item = wikitext of the conversion result -- for an output which is a multiple (like 'ftin'); -- or return false, t where t is an error message table. local multiple = out_unit_table.multiple -- table of scaling factors (will not be nil) local combos = out_unit_table.combination -- table of unit tables (will not be nil) local abbr = parms.abbr local abbr_org = parms.abbr_org local disp = parms.disp local want_name = (abbr_org == nil and (disp == 'or' or disp == 'slash')) or not (abbr == 'on' or abbr == 'out' or abbr == 'mos') local want_link = (parms.lk == 'on' or parms.lk == 'out') local mid = '' local sep1 = '&nbsp;' local sep2 = ' ' if parms.opt_adjectival then if parms.opt_flip then mid = parms.mid or '' end if want_name then sep1 = '-' sep2 = '-' end end local function make_result(info) local fmt, outvalue, sign local results = {} for i = 1, #combos do local thisvalue, strforce local out_current = combos[i] out_current.inout = 'out' local scale = multiple[i] if i == 1 then -- least significant unit ('in' from 'ftin') local fraction local success, outinfo = cvtround(parms, info, in_unit_table, out_current) if not success then return false, outinfo end sign = outinfo.sign if outinfo.is_scientific then strforce = outinfo.show fraction = '' else fraction = (outinfo.show):match('[' .. numdot .. '](.*)') or '' -- outinfo.show is in local language end fmt = '%.' .. ulen(fraction) .. 'f' -- to reproduce precision if fraction == '' then outvalue = floor(outinfo.raw_absvalue + 0.5) -- keep all integer digits of least significant unit else outvalue = outinfo.absvalue end end if scale then outvalue, thisvalue = floor(outvalue / scale), outvalue % scale else thisvalue = outvalue end local id if want_name then id = out_current[(thisvalue == 1) and 'name1' or 'name2'] else id = out_current['symbol'] end if want_link then local link = out_current.link if link then id = make_link(link, id, out_current) end end local strval if strforce and outvalue == 0 then sign = '' -- any sign is in strforce strval = strforce -- show small values in scientific notation; will only use least significant unit else strval = (thisvalue == 0) and from_en('0') or with_separator(parms, format(fmt, thisvalue)) end table.insert(results, strval .. sep1 .. id) if outvalue == 0 then break end fmt = '%.0f' -- only least significant unit can have a fraction end local reversed, count = {}, #results for i = 1, count do reversed[i] = results[count + 1 - i] end return true, sign .. table.concat(reversed, sep2) end local valinfo = in_unit_table.valinfo local success, result = make_result(valinfo[1]) if not success then return false, result end local range = parms.range if range then for i = 1, range.n do local success, result2 = make_result(valinfo[i+1]) if not success then return false, result2 end result = range_text(range[i], want_name, parms, result, result2) end end return true, result .. mid end local function process(parms, in_unit_table) -- Return true, s where s = final wikitext result, -- or return false, t where t is an error message table. linked_pages = {} local success, out_unit_table local invalue1 = in_unit_table.valinfo[1].value local out_unit = parms.out_unit if out_unit == nil or out_unit == '' then success, out_unit = get_default(invalue1, in_unit_table) if not success then return false, out_unit end end success, out_unit_table = lookup(out_unit, parms.opt_sp_us, 'any_combination') if not success then return false, out_unit_table end if in_unit_table.utype ~= out_unit_table.utype then return false, { 'cvt_mismatch', in_unit_table.utype, out_unit_table.utype } end local flipped = parms.opt_flip local parts = {} for part = 1, 2 do -- The LHS (parts[1]) is normally the input, but is the output if flipped. -- Process LHS first so it will be linked, if wanted. -- Linking to the same item is suppressed in the RHS to avoid overlinking. if (part == 1 and not flipped) or (part == 2 and flipped) then parts[part] = process_input(parms, in_unit_table) else local outputs = {} local combos -- nil (for 'ft' or 'ftin'), or table of unit tables (for 'm ft') if out_unit_table.multiple == nil then -- nil ('ft' or 'm ft'), or table of factors ('ftin') combos = out_unit_table.combination end local imax = combos and #combos or 1 -- 1 (single unit) or number of unit tables for i = 1, imax do local success, item local out_current = combos and combos[i] or out_unit_table out_current.inout = 'out' if out_current.multiple == nil then success, item = make_output_single(parms, in_unit_table, out_current) else success, item = make_output_multiple(parms, in_unit_table, out_current) end if not success then return false, item end table.insert(outputs, item) end parts[part] = parms.opt_input_unit_only and '' or table.concat(outputs, '; ') end end if parms.opt_sortable then parts[1] = ntsh(invalue1, parms.opt_sortable_debug) .. parts[1] end local wikitext if parms.table_joins then wikitext = parms.table_joins[1] .. parts[1] .. parms.table_joins[2] .. parts[2] else wikitext = parts[1] .. parms.joins[1] .. parts[2] .. parms.joins[2] end if parms.warnings then wikitext = wikitext .. parms.warnings end return true, wikitext end local function main_convert(frame) set_config(frame) local result local success, parms, in_unit_table = get_parms(frame:getParent()) if success then success, result = process(parms, in_unit_table) else result = parms end if success then return result end return message(result) end return { convert = main_convert } </pre> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5ccf8d5c58‐l82nr Cached time: 20241211085336 Cache expiry: 2592000 Reduced expiry: false Complications: [] CPU time usage: 0.009 seconds Real time usage: 0.013 seconds Preprocessor visited node count: 14/1000000 Post‐expand include size: 3204/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 3/100 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 79/5000000 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 3.064 1 Module:Convert/doc 100.00% 3.064 1 -total --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&type=1x1&usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">បានពី "<a dir="ltr" href="https://km.wikipedia.org/w/index.php?title=Module:Convert&oldid=145339">https://km.wikipedia.org/w/index.php?title=Module:Convert&oldid=145339</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> ទំព័រនេះត្រូវបានកែចុងក្រោយនៅម៉ោងម៉ោង១១:១៦ ថ្ងៃព្រហស្បតិ៍ ទី២៩ ខែសីហា ឆ្នាំ២០១៣។</li> <li id="footer-info-copyright">អត្ថបទនេះត្រូវបានផ្ដល់ក្រោមអាជ្ញាបណ្ណ <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike License</a> ។ លក្ខខណ្ឌបន្ថែមផ្សេងៗទៀតក៏នឹងអាចត្រូវបានអនុវត្ត។ សូមមើល <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">លក្ខខណ្ឌក្នុងការប្រើប្រាស់</a> សម្រាប់ព័ត៌មានលម្អិត។</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">គោលការណ៍នៃភាពឯកជន</a></li> <li id="footer-places-about"><a href="/wiki/%E1%9E%9C%E1%9E%B7%E1%9E%82%E1%9E%B8%E1%9E%97%E1%9E%B8%E1%9E%8C%E1%9E%B6:%E1%9E%A2%E1%9F%86%E1%9E%96%E1%9E%B8">អំពីវិគីភីឌា</a></li> <li id="footer-places-disclaimers"><a href="/wiki/%E1%9E%9C%E1%9E%B7%E1%9E%82%E1%9E%B8%E1%9E%97%E1%9E%B8%E1%9E%8C%E1%9E%B6:%E1%9E%80%E1%9E%B6%E1%9E%9A%E1%9E%94%E1%9E%8A%E1%9E%B7%E1%9E%9F%E1%9F%81%E1%9E%92%E2%80%8B%E1%9E%91%E1%9E%BC%E1%9E%91%E1%9F%85">ការបដិសេធ</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">ក្រមសីលធម៌</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">អ្នកសរសេរកូដ</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/km.wikipedia.org">ស្ថិតិ</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//km.m.wikipedia.org/w/index.php?title=Module:Convert&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">អានលើឧបករណ៍ចល័ត</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5ccf8d5c58-l82nr","wgBackendResponseTime":235,"wgPageParseReport":{"limitreport":{"cputime":"0.009","walltime":"0.013","ppvisitednodes":{"value":14,"limit":1000000},"postexpandincludesize":{"value":3204,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":3,"limit":100},"expensivefunctioncount":{"value":0,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":79,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 3.064 1 Module:Convert/doc","100.00% 3.064 1 -total"]},"cachereport":{"origin":"mw-web.codfw.main-5ccf8d5c58-l82nr","timestamp":"20241211085336","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>