• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

DenisCarriere/Leaflet.draw.locales:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

DenisCarriere/Leaflet.draw.locales

开源软件地址(OpenSource Url):

https://github.com/DenisCarriere/Leaflet.draw.locales

开源编程语言(OpenSource Language):

TypeScript 98.4%

开源软件介绍(OpenSource Introduction):

Leaflet.draw.locales

Build Status npm version MIT licensed

Localization for Leaflet.draw, changing between languages is now effortless.

Install

$ npm install --save leaflet-draw-locales

Example

import drawLocales from 'leaflet-draw-locales'

// Automatically defines Leaflet.draw to the specified language
drawLocales('fr')

// Customize locale language
const locale = drawLocales('fr')
locale.draw.toolbar.buttons.polygon = 'Awesome polygon!'
L.drawLocal = locale

Languages

Code Language
de German
en English
ar Arabic
fi Finnish
fr French
hu Hungarian
it Italian
ka Georgian
es Spanish
pl Polish
pt Portuguese
ru Russian
uk Ukrainian
cs Czech
sk Slovak
nl Dutch
no Norwegian
am Amharic
zh Chinese
tr Turkish

Submit a language

  • Fork this repo
  • Install node modules with npm install
  • Copy-paste an existing .ts language from src/locales/ as your template
  • Include your new language in src/index.ts, it should be included at:
    • The import at the top, import your new file
    • The language contant should get the 2 letter identification for the language
    • The switch-case should be updated to support cases for your language, setting the locale to the 2 letter code for the language
    • The Language type should be edited to include a union of all possible cases for the language you added
  • Include your language in the table in README.md
  • Run npm run test && npm run build to confirm your code works properly
  • Submit your locales via a GitHub PR



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap