My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
UsingGetLocalizationWithcURL  
Using cURL to upload file to Get Localization
Featured
Updated Apr 13, 2011 by phong.le...@gtempaccount.com

Note that all the literal within the curly brace are variables

{username} : Username in GetLocalization

{password} : Password in GetLocalization

{productname} : Product name in GetLocalization

{filepath} : Local filepath

{local_zipfilename} : The zip file name after generated

Note that all the API calls will return the status code of 200 with message in plain text depending on the situations. Currently only plain text message is supported in the returned value.

There is only one exception with status code of 401 when the username or password is incorrectly specified.

Updating master file

curl --form file=@{filenpath} --user {username}:{password} https://www.getlocalization.com/{productname}/api/update-master

Returned messages (status code 200)

  • Success. Master file has been updated.
  • ERROR: File name does NOT exist in the project. Please check the file name again.
  • ERROR: Missing the file parameter. Please specify the file to upload.

Creating new master file

curl --form file=@{filenpath} --user {username}:{password} https://www.getlocalization.com/{productname}/api/create-master/{platform_code}/{iana_code}

For the platform code, please review below

Returned messages (status code 200)

  • Success. File has been uploaded.
  • ERROR: File name does exist in the project. Please select another.
  • ERROR: Missing the file parameter. Please specify the file to upload.

To generate zip file from the project

Note that the {local_zipfilename} must be specified in order to create zip file from the project.

curl --user {username}:{password} https://www.getlocalization.com/{productname}/api/translations/zip -o {local_zipfilename}

The platform code table

  • symbian = 'Symbian'
  • ios = 'iOS'
  • django = 'Django'
  • qt = 'Qt'
  • ruby = 'Ruby On Rails'
  • codeigniter = 'CodeIgniter'
  • symfony ='Symfony'
  • cakephp = 'CakePHP'
  • gettext = 'GNU Gettext'
  • js = 'Javascript / jQuery'
  • resx = 'Resx'
  • xliff = 'Xliff'
  • android = 'Android'
  • ini ='INI file'
  • javaproperties ='Java Properties file'
  • json = 'JSON file'
  • adobe = 'Adobe AIR'
  • windowsmobile = 'Windows Phone'
  • plain = 'Plain text'
  • phparray = 'PHP Array'
  • mac = 'Mac OS X'
Powered by Google Project Hosting