mail Questions? Contact Crowdin.net

Add File

Add new file to Crowdin project.

Request

POST http://api.crowdin.net/api/project/{project-identifier}/add-file?key={project-key}

Parameters

Name Value Description
filesrequired array Files array that should be added to Crowdin project. Array keys should contain file names with path in Crowdin project.
keyrequired string Project API key.
typeoptional string Acceptable values are:
  • empty value or "auto" - Try to detect file type by extension or MIME type
  • "gettext" - GNU GetText (*.po, *.pot)
  • "qtts" - Nokia Qt (*.ts)
  • "dklang" - Delphi DKLang (*.dklang)
  • "android" - Android (*.xml)
  • "resx" - .NET (*.resx)
  • "properties" - Java (*.properties)
  • "macosx" - Mac OS X / iOS (*.strings)
  • "blackberry" - BlackBerry (*.rrc)
  • "Symbian" - Symbian (*.lXX)
  • "flex" - Adobe Flex (*.properties)
  • "bada" - Samsung Bada (*.xml)
  • "txt" - Plain Text (*.txt)
  • "srt" - SubRip .srt (*.srt)
  • "sbv" - Youtube .sbv (*.sbv)
  • "xliff" - XLIFF (*.xliff)
  • "html" - HTML (*.html, *.htm, *.xhtml, *.xhtm)
  • "dtd" - Mozilla DTD (*.dtd)
  • "chrome" - Google Chrome Extension (*.json)
schemeoptional string Note: Used only when uploading CSV file to define data columns mapping.
Acceptable value is the combination of the folloving constants:
  • "identifier" - Column contains string identifier.
  • "source_phrase" - Column contains only source string (in result string will contain same string).
  • "source_or_translation" - Column contains source string but when exporting same column should contain translation (also when uploading existing translations, the value from this column will be used as a translated string).
  • "translation" - Column contains translated string (when imported file already contains translations).
  • "context" - Column contains some comments on source string. Context information.
  • "none" - Do not import column.
Example parameter you will have to add: &scheme=identifier,source_or_translation
Variables
project-identifierrequired string Should contain the project identifier.

Response

If the method is successful it responds with an XML structure, as shown below.
<?xml version="1.0" encoding="ISO-8859-1"?>

  
    
      strings.xml
      4
      11
    
  

Unsuccessful respose sample:
<?xml version="1.0" encoding="ISO-8859-1"?>

  3
  API key is not valid


Examples

curl \
-F "type=android" \
-F "files[/directory/arrays.xml]=@arrays.xml" \
-F "files[strings.xml]=@strings.xml" \
http://api.crowdin.net/api/project/{project-identifier}/add-file?key={project-key}