Skip to content

Instantly share code, notes, and snippets.

View getlocalization's full-sized avatar

Get Localization getlocalization

View GitHub Profile
@getlocalization
getlocalization / upload_translations.sh
Created May 28, 2013 07:17
Upload values folders and their respective strings.xml files to Get Localization. Prerequisites: - You have project already on Get Localization - Master file strings.xml already exists.
#!/bin/bash
# Path to your Android project res directory, it should contain the values directories.
RES_PATH=res/*
# Get Localization settings
USERNAME=u
PASSWORD=p
PROJECT=yourProject
<script type="text/javascript" src="http://www.getlocalization.com/jsapi?key=YOUR-PERSONAL-API-KEY"></script>
<script type="text/javascript">
getlocalization.language.load();
getlocalization.language.setOnLoadCallback(function() {
// Translations are loaded, make the first translation from English to Finnish.
getlocalization.language.translate('Translate this text', 'en', 'fi', function(result) {
if (result.translation)
alert(result.translation);
});