class.upload.php translations
Since version 0.25, the class error messages can now be translated. If your language is not listed below, send me your own translation!
How to use the translation files?
Instantiate the class with a second argument being the language code. For instance, for the French language, you need to have the file class.upload.fr_FR.php in a directory lang/, below the main upload class. Then, instantiate the class as following:
$handle = new upload($_FILES['image_field'], 'fr_FR'); $handle = new upload('/home/user/myfile.jpg', 'fr_FR');
Note that the class is by default in English. If you only needs English language, you don't need any translation files.
How to create translations?
You can use this file as a template to create new language files. In the file, the messages are provided in English; simply change the text in the array (don't change any keys!). Then, put your name in the file, and replace all the xxxx that can be there. Rename the file with your language code instead of xx_XX, and send it to me.
The file must be edited in UTF-8, but don't save it with the BOM bit. You can use an editor such as Scite to open the file, and then select File > Encoding > UTF-8 Cookie to see the characters properly.
Translations available
Here is a list of the translations available. Although there are also provided in the packages, you can get the latest versions here. Download it, replace the .txt extension with .php, and you're done.
- French translation by Colin Verot. Download here
- Spanish translation by Jorge Peréz Vega. Download here
- Italian translation by Paolo Iulita. Download here
- Dutch translation by Alfons Knaapen. Download here
- German translation by some dude from Germany. Download here
- Czech translation by Lukáš Gavenda. Download here
- Swedish translation by Mikael Andersson. Download here
- Norwegian translation by Trond Torkildsen. Download here
- Danish translation by Lars Krogsgård Hansen. Download here
- Finnish translation by Asko Pesola. Download here
- Lithuanian translation by Dainius Kaupaitis. Download here
- Polish translation by Bartosz Rychlicki. Download here
- Romanian translation by Cristian Datculescu. Download here
- Croatian translation by Kresimir Virovic. Download here
- Hungarian translation by Bosternák Balázs. Download here
- Slovak translation by Bryan. Download here
- Brazilian Portugese translation by Yuri Vecchi Baladelli. Download here
- Turkish translation by Volkan Metin. Download here
- Farsi translation by Morteza Karimi. Download here
- Greek translation by Christos Grezios. Download here
- Macedonian translation by Zoran Tanevski. Download here
- Serbian translation by Zeljko Markovic. Download here
- Ukrainian translation by Sergiy Galashyn. Download here
Also by Sergiy Galashyn, a Windows-1251 encoded translation file: Download here
- Catalan translation by Antoni Canals. Download here
- Estonian translation by Lohe. Download here
- Russian translation by Chup. Download here
Also by Chup, a Windows-1251 encoded translation file: Download here
- Hebrew translation by VirtualFlavius. Download here
- Tamil translation by Vijaya Sankar. Download here
- Japanese translation by Kenta Ozaki. Download here
- Indonesian (Bahasa) translation by Irwan Butar Butar. Download here
- Vietnamese translation by junzennt. Download here
- Chinese translation by Shiwei Cao (曹诗蔚). Download here
Also by Shiwei Cao, a gb-2312 encoded translation file: Download here
- Traditional Chinese translation by Yang Chih-Wen. Download here
It is normal that some files appear with some weird characters. It is because the translations are in UTF-8, but without the BOM byte. Simply use the file as is, and set your web page to be in UTF-8.