Module:Transliterator: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Finished, I think.) |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p. | function p.main( frame ) | ||
local word = frame.args[1] | local word = frame.args[1] | ||
local a = string.gsub( word, "a", "ឆ" ) | local a = string.gsub( word, "a", "ឆ" ) | ||
local aa = string.gsub( a, "ā", "ឹ" ) | local aa = string.gsub( a, "ā", "ឹ" ) | ||
local b = string.gsub( aa, "b", "េ" ) | local b = string.gsub( aa, "b", "េ" ) | ||
local sh = string.gsub( | local ch = string.gsub( b, "ch", "➽" ) | ||
local h = string.gsub( | local c = string.gsub( ch, "c", "⇇" ) | ||
local d = string.gsub( c, "d", "⥣" ) | |||
local f = string.gsub( d, "f", "⬇︎" ) | |||
local ng = string.gsub( f, "ng", "⇲" ) | |||
local g = string.gsub( ng, "g", "↹" ) | |||
local kh = string.gsub( g, "kh", "↨" ) | |||
local sh = string.gsub( kh, "sh", "រ" ) | |||
local th = string.gsub( sh, "th", "⥺" ) | |||
local h = string.gsub( th, "h", "ត" ) | |||
local i = string.gsub( h, "i", "យ" ) | local i = string.gsub( h, "i", "យ" ) | ||
local ii = string.gsub( i, "ī", "ុ" ) | local ii = string.gsub( i, "ī", "ុ" ) | ||
Line 19: | Line 27: | ||
local q = string.gsub( p, "q", "ថ" ) | local q = string.gsub( p, "q", "ថ" ) | ||
local r = string.gsub( q, "r", "ង" ) | local r = string.gsub( q, "r", "ង" ) | ||
local t = string.gsub( | local s = string.gsub( r, "s", "Ӝ" ) | ||
local t = string.gsub( s, "t", "ហ" ) | |||
local u = string.gsub( t, "u", "្" ) | local u = string.gsub( t, "u", "្" ) | ||
local x = string.gsub( | local uu = string.gsub( u, "ū", "ᑓ" ) | ||
local aimg = string.gsub( | local v = string.gsub( uu, "v", "א" ) | ||
local w = string.gsub( v, "w", "ב" ) | |||
local x = string.gsub( w, "x", "ក" ) | |||
local y = string.gsub( x, "y", "ג" ) | |||
local z = string.gsub( y, "z", "ד" ) | |||
local aimg = string.gsub( z, "ឆ", "[[File:Aurebesh-AE.svg|18px]]" ) | |||
local aaimg = string.gsub( aimg, "ឹ", "[[File:Aurebesh-A.svg|22px]]" ) | local aaimg = string.gsub( aimg, "ឹ", "[[File:Aurebesh-A.svg|22px]]" ) | ||
local | local bimg = string.gsub( aaimg, "េ", "[[File:Aurebesh-B.svg|21px]]" ) | ||
local chimg = string.gsub( bimg, "➽", "[[File:Aurebesh-CH.svg|22px]]" ) | |||
local cimg = string.gsub( chimg, "⇇", "[[File:Aurebesh-C.svg|13px]]" ) | |||
local dimg = string.gsub( cimg, "⥣", "[[File:Aurebesh-D.svg|18px]]" ) | |||
local fimg = string.gsub( dimg, "⬇︎", "[[File:Aurebesh-F.svg|21px]]" ) | |||
local ngimg = string.gsub( fimg, "⇲", "[[File:Aurebesh-NG.svg|17px]]" ) | |||
local gimg = string.gsub( ngimg, "↹", "[[File:Aurebesh-G.svg|20px]]" ) | |||
local khimg = string.gsub( gimg, "↨", "[[File:Aurebesh-KH.svg|15px]]" ) | |||
local shimg = string.gsub( khimg, "រ", "[[File:Aurebesh-SH.svg|24px]]" ) | |||
local thimg = string.gsub( shimg, "⥺", "[[File:Aurebesh-TH.svg|19px]]" ) | |||
local himg = string.gsub( thimg, "ត", "[[File:Aurebesh-H.svg|21px]]") | |||
local iimg = string.gsub( himg, "យ", "[[File:Aurebesh-E.svg|20px]]" ) | |||
local iiimg = string.gsub( iimg, "ុ", "[[File:Aurebesh-I.svg|8px]]" ) | |||
local jimg = string.gsub( iiimg, "ិ", "[[File:Aurebesh-J.svg|19px]]" ) | |||
local kimg = string.gsub( jimg, "ោ", "[[File:Aurebesh-K.svg|20px]]" ) | |||
local limg = string.gsub( kimg, "ផ", "[[File:Aurebesh-L.svg|13px]]" ) | |||
local mimg = string.gsub( limg, "ៀ", "[[File:Aurebesh-M.svg|12px]]" ) | |||
local nimg = string.gsub( mimg, "ឪ", "[[File:Aurebesh-N.svg|21px]]" ) | |||
local oimg = string.gsub( nimg, "ា", "[[File:Aurebesh-O.svg|19px]]" ) | |||
local ooimg = string.gsub( oimg, "ស", "[[File:Aurebesh-EO.svg|21px]]" ) | |||
local pimg = string.gsub( ooimg, "ដ", "[[File:Aurebesh-P.svg|13px]]" ) | |||
local qimg = string.gsub( pimg, "ថ", "[[File:Aurebesh-Q.svg|17px]]" ) | |||
return | local rimg = string.gsub( qimg, "ង", "[[File:Aurebesh-R.svg|16px]]" ) | ||
local simg = string.gsub( rimg, "Ӝ", "[[File:Aurebesh-S.svg|20px]]" ) | |||
local timg = string.gsub( simg, "ហ", "[[File:Aurebesh-T.svg|21px]]" ) | |||
local uimg = string.gsub( timg, "្", "[[File:Aurebesh-U.svg|19px]]" ) | |||
local uuimg = string.gsub( uimg, "ᑓ", "[[File:Aurebesh-OO.svg|13px]]" ) | |||
local vimg = string,gsub( uuimg, "א", "[[File:Aurebesh-V.svg|16px]]" ) | |||
local wimg = string.gsub( vimg, "ב", "[[File:Aurebesh-W.svg|21px]]" ) | |||
local ximg = string.gsub( wimg, "ក", "[[File:Aurebesh-X.svg|17px]]" ) | |||
local yimg = string.gsub( ximg, "ג", "[[File:Aurebesh-Y.svg|21px]]" ) | |||
local zimg = string.gsub( yimg, "ד", "[[File:Aurebesh-Z.svg|18px]]" ) | |||
return zimg | |||
end | end | ||
return p | return p |
Revision as of 23:19, 13 February 2019
- The following documentation is located at Module:Transliterator/doc.[edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
local p = {}
function p.main( frame )
local word = frame.args[1]
local a = string.gsub( word, "a", "ឆ" )
local aa = string.gsub( a, "ā", "ឹ" )
local b = string.gsub( aa, "b", "េ" )
local ch = string.gsub( b, "ch", "➽" )
local c = string.gsub( ch, "c", "⇇" )
local d = string.gsub( c, "d", "⥣" )
local f = string.gsub( d, "f", "⬇︎" )
local ng = string.gsub( f, "ng", "⇲" )
local g = string.gsub( ng, "g", "↹" )
local kh = string.gsub( g, "kh", "↨" )
local sh = string.gsub( kh, "sh", "រ" )
local th = string.gsub( sh, "th", "⥺" )
local h = string.gsub( th, "h", "ត" )
local i = string.gsub( h, "i", "យ" )
local ii = string.gsub( i, "ī", "ុ" )
local j = string.gsub( ii, "j", "ិ" )
local k = string.gsub( j, "k", "ោ" )
local l = string.gsub( k, "l", "ផ" )
local m = string.gsub( l, "m", "ៀ" )
local n = string.gsub( m, "n", "ឪ" )
local o = string.gsub( n, "o", "ា" )
local oo = string.gsub( o, "ō", "ស" )
local p = string.gsub( oo, "p", "ដ" )
local q = string.gsub( p, "q", "ថ" )
local r = string.gsub( q, "r", "ង" )
local s = string.gsub( r, "s", "Ӝ" )
local t = string.gsub( s, "t", "ហ" )
local u = string.gsub( t, "u", "្" )
local uu = string.gsub( u, "ū", "ᑓ" )
local v = string.gsub( uu, "v", "א" )
local w = string.gsub( v, "w", "ב" )
local x = string.gsub( w, "x", "ក" )
local y = string.gsub( x, "y", "ג" )
local z = string.gsub( y, "z", "ד" )
local aimg = string.gsub( z, "ឆ", "[[File:Aurebesh-AE.svg|18px]]" )
local aaimg = string.gsub( aimg, "ឹ", "[[File:Aurebesh-A.svg|22px]]" )
local bimg = string.gsub( aaimg, "េ", "[[File:Aurebesh-B.svg|21px]]" )
local chimg = string.gsub( bimg, "➽", "[[File:Aurebesh-CH.svg|22px]]" )
local cimg = string.gsub( chimg, "⇇", "[[File:Aurebesh-C.svg|13px]]" )
local dimg = string.gsub( cimg, "⥣", "[[File:Aurebesh-D.svg|18px]]" )
local fimg = string.gsub( dimg, "⬇︎", "[[File:Aurebesh-F.svg|21px]]" )
local ngimg = string.gsub( fimg, "⇲", "[[File:Aurebesh-NG.svg|17px]]" )
local gimg = string.gsub( ngimg, "↹", "[[File:Aurebesh-G.svg|20px]]" )
local khimg = string.gsub( gimg, "↨", "[[File:Aurebesh-KH.svg|15px]]" )
local shimg = string.gsub( khimg, "រ", "[[File:Aurebesh-SH.svg|24px]]" )
local thimg = string.gsub( shimg, "⥺", "[[File:Aurebesh-TH.svg|19px]]" )
local himg = string.gsub( thimg, "ត", "[[File:Aurebesh-H.svg|21px]]")
local iimg = string.gsub( himg, "យ", "[[File:Aurebesh-E.svg|20px]]" )
local iiimg = string.gsub( iimg, "ុ", "[[File:Aurebesh-I.svg|8px]]" )
local jimg = string.gsub( iiimg, "ិ", "[[File:Aurebesh-J.svg|19px]]" )
local kimg = string.gsub( jimg, "ោ", "[[File:Aurebesh-K.svg|20px]]" )
local limg = string.gsub( kimg, "ផ", "[[File:Aurebesh-L.svg|13px]]" )
local mimg = string.gsub( limg, "ៀ", "[[File:Aurebesh-M.svg|12px]]" )
local nimg = string.gsub( mimg, "ឪ", "[[File:Aurebesh-N.svg|21px]]" )
local oimg = string.gsub( nimg, "ា", "[[File:Aurebesh-O.svg|19px]]" )
local ooimg = string.gsub( oimg, "ស", "[[File:Aurebesh-EO.svg|21px]]" )
local pimg = string.gsub( ooimg, "ដ", "[[File:Aurebesh-P.svg|13px]]" )
local qimg = string.gsub( pimg, "ថ", "[[File:Aurebesh-Q.svg|17px]]" )
local rimg = string.gsub( qimg, "ង", "[[File:Aurebesh-R.svg|16px]]" )
local simg = string.gsub( rimg, "Ӝ", "[[File:Aurebesh-S.svg|20px]]" )
local timg = string.gsub( simg, "ហ", "[[File:Aurebesh-T.svg|21px]]" )
local uimg = string.gsub( timg, "្", "[[File:Aurebesh-U.svg|19px]]" )
local uuimg = string.gsub( uimg, "ᑓ", "[[File:Aurebesh-OO.svg|13px]]" )
local vimg = string,gsub( uuimg, "א", "[[File:Aurebesh-V.svg|16px]]" )
local wimg = string.gsub( vimg, "ב", "[[File:Aurebesh-W.svg|21px]]" )
local ximg = string.gsub( wimg, "ក", "[[File:Aurebesh-X.svg|17px]]" )
local yimg = string.gsub( ximg, "ג", "[[File:Aurebesh-Y.svg|21px]]" )
local zimg = string.gsub( yimg, "ד", "[[File:Aurebesh-Z.svg|18px]]" )
return zimg
end
return p