Docs
- Getting Started
- SME Uploader
- Companion
- List of Plugins
- Common Plugin Options
- Custom Stores
- Locale Packs
UI Elements
Sources
- Drag & Drop
- File Input
- Webcam
- Provider Plugins
- ⓒ Dropbox
- ⓒ Google Drive
- ⓒ OneDrive
- ⓒ Zoom
- ⓒ Import From URL
Destinations
File Processing
- Image Editor
- Robodog Introduction
- Robodog File Picker
- Robodog Form
- Robodog Upload
- Robodog Dashboard
- Transloadit
Miscellaneous
Contributing
Locale Packs
SME Uploader speaks multiple languages, English being the default. You can use a locale pack to translate SME Uploader into your language of choice.
Using a locale pack from npm
This is the recommded way. Install @sme-uploader/locales package from npm, then choose the locale you’d like to use: @sme-uploader/locales/lib/LANGUAGE_CODE.
npm i @sme-uploader/core @sme-uploader/locales |
const SmeUploader = require('@sme-uploader/core'); const German = require('@sme-uploader/locales/lib/de_DE'); // see below for the full list of locales const uploader = new SmeUploader({ debug: true, locale: German }); |
Using a locale pack from CDN
Add a <script> tag with SME Uploader bundle and the locale pack you’d like to use. You can copy/paste the link from the CDN column in the locales table. The locale will attach itself to the SmeUploader.locales object.
<script src="https://unpkg.com/sme-uploader@1.0.6/dist/sme-uploader.min.js"></script> <script src="https://unpkg.com/sme-uploader@1.0.6/locales/de_DE.min.js"></script> <script> var uploader = SmeUploader.Core({ debug: true, locale: SmeUploader.locales.de_DE }) </script> |
Overriding locale strings for a specific plugin
Many plugins come with their own locale strings, and the packs we provide consist of most of those strings. You can, however, override a locale string for a specific plugin, regardless of whether you are using locale pack or not. See the plugin documentation for the list of locale strings it uses (for example, here’s how to use it with the Dashboard UI).
const SmeUploader = require('@sme-uploader/core'); const DragDrop = require('@sme-uploader/drag-drop'); const Russian = require('@sme-uploader/locales/lib/ru_RU'); const uploader = new SmeUploader({ debug: true, autoProceed: true, locale: Russian }); uploader.use(DragDrop, { target: '.SmeUploaderDragDrop', // We are using the ru_RU locale pack (set above in SME Uploader options), // but you can also override specific strings like so: locale: { strings: { browse: 'выберите ;-)' } } }); |
List of locale packs
| 35 Locales | NPM | CDN | Source on GitHub |
|---|---|---|---|
| Arabic Saudi Arabia |
@sme-uploader/locales/lib/ar_SA |
ar_SA.js |
|
| Bulgarian Bulgaria |
@sme-uploader/locales/lib/bg_BG |
bg_BG.js |
|
| Chinese China |
@sme-uploader/locales/lib/zh_CN |
zh_CN.js |
|
| Chinese Taiwan, Province of China |
@sme-uploader/locales/lib/zh_TW |
zh_TW.js |
|
| Croatian Croatia |
@sme-uploader/locales/lib/hr_HR |
hr_HR.js |
|
| Czech Czech Republic |
@sme-uploader/locales/lib/cs_CZ |
cs_CZ.js |
|
| Danish Denmark |
@sme-uploader/locales/lib/da_DK |
da_DK.js |
|
| Dutch Netherlands |
@sme-uploader/locales/lib/nl_NL |
nl_NL.js |
|
| English United States |
@sme-uploader/locales/lib/en_US |
en_US.js |
|
| Finnish Finland |
@sme-uploader/locales/lib/fi_FI |
fi_FI.js |
|
| French France |
@sme-uploader/locales/lib/fr_FR |
fr_FR.js |
|
| Galician Spain |
@sme-uploader/locales/lib/gl_ES |
gl_ES.js |
|
| German Germany |
@sme-uploader/locales/lib/de_DE |
de_DE.js |
|
| Greek Greece |
@sme-uploader/locales/lib/el_GR |
el_GR.js |
|
| Hebrew Israel |
@sme-uploader/locales/lib/he_IL |
he_IL.js |
|
| Hungarian Hungary |
@sme-uploader/locales/lib/hu_HU |
hu_HU.js |
|
| Icelandic Iceland |
@sme-uploader/locales/lib/is_IS |
is_IS.js |
|
| Indonesian Indonesia |
@sme-uploader/locales/lib/id_ID |
id_ID.js |
|
| Italian Italy |
@sme-uploader/locales/lib/it_IT |
it_IT.js |
|
| Japanese Japan |
@sme-uploader/locales/lib/ja_JP |
ja_JP.js |
|
| Korean Korea, Republic of |
@sme-uploader/locales/lib/ko_KR |
ko_KR.js |
|
| Persian Iran, Islamic Republic of |
@sme-uploader/locales/lib/fa_IR |
fa_IR.js |
|
| Polish Poland |
@sme-uploader/locales/lib/pl_PL |
pl_PL.js |
|
| Portuguese Brazil |
@sme-uploader/locales/lib/pt_BR |
pt_BR.js |
|
| Portuguese Portugal |
@sme-uploader/locales/lib/pt_PT |
pt_PT.js |
|
| Romanian Romania |
@sme-uploader/locales/lib/ro_RO |
ro_RO.js |
|
| Russian Russian Federation |
@sme-uploader/locales/lib/ru_RU |
ru_RU.js |
|
| Serbian Serbia (Cyrillic) |
@sme-uploader/locales/lib/sr_RS_Cyrillic |
sr_RS_Cyrillic.js |
|
| Serbian Serbia (Latin) |
@sme-uploader/locales/lib/sr_RS_Latin |
sr_RS_Latin.js |
|
| Slovak Slovakia |
@sme-uploader/locales/lib/sk_SK |
sk_SK.js |
|
| Spanish Spain |
@sme-uploader/locales/lib/es_ES |
es_ES.js |
|
| Swedish Sweden |
@sme-uploader/locales/lib/sv_SE |
sv_SE.js |
|
| Thai Thailand |
@sme-uploader/locales/lib/th_TH |
th_TH.js |
|
| Turkish Turkey |
@sme-uploader/locales/lib/tr_TR |
tr_TR.js |
|
| Vietnamese Viet Nam |
@sme-uploader/locales/lib/vi_VN |
vi_VN.js |
Contributing a new language
If you speak a language we don’t yet support, you can contribute! Here’s how you do it:
- Go to the sme-uploader/locales directory in the SME Uploader GitHub repo.
- Go to
en_US.jsand copy its contents, as English is the most up-to-date locale. - Press “Create new file”, name it according to the
language_COUNTRYformat, make sure to use underscore_as a divider. Examples:en_US,en_GB,ru_RU,ar_AE. Variants should be trailing, e.g.:sr_RS_Latinfor Serbian Latin vs Cyrillic. - If your language has different pluralization rules than English, update the
pluralizeimplementation. - Paste what you’ve copied from
en_US.jsand use it as a starting point to translate strings into your language. - When you are ready, save the file — this should create a PR that we’ll then review 🎉 Thanks!