How to translate controller function objects
See original GitHub issueen.json
{
"CHOOSE_IMAGE": "Choose image source",
"CAMERA": "Camera",
"LIBRARY": "Library",
"CANCEL": "Cancel"
}
th.json
{
"CHOOSE_IMAGE": "เลือกที่มาของภาพ",
"CAMERA": "กล้อง",
"LIBRARY": "แกลอรี่",
"CANCEL": "ยกเลิก"
}
feedback.controller.js
...
function getImageSource() {
var deferred = $q.defer();
$ionicActionSheet.show({
buttons: [
{ text: 'CAMERA' },
{ text: 'LIBRARY' }
],
titleText: 'CHOOSE_IMAGE',
cancelText: 'CANCEL',
cancel: function () {
deferred.reject();
},
buttonClicked: function (index) {
if (index === 0) {
deferred.resolve(Camera.PictureSourceType.CAMERA);
} else {
deferred.resolve(Camera.PictureSourceType.PHOTOLIBRARY);
}
return true;
}
});
return deferred.promise;
}
...
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
How to angular-translate controller function objects
Inside the function are system button labels that need to be translated. I have provided the actual en.json and th.json files to show...
Read more >15.3 Implementing Controllers - Spring
You convert the request body to the method argument by using a HttpMessageConverter . HttpMessageConverter is responsible for converting from the HTTP request ......
Read more >keckcaves:controllers [CSEWiki]
To “pick up” space, press and hold one grip button on one controller (the two grip buttons on the same controller act as...
Read more >How to setup a Translate Controller Plugin in Zend Framework 3
First of all, we have to write our plugin that will take Zend Translator object in constructor and will wrap its translate() method....
Read more >Scripting API: Transform.Translate - Unity - Manual
Declaration. public void Translate(Vector3 translation);. Declaration · Declaration. public void Translate(float x, float y, float z);. Declaration · Declaration.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@danielbair
or when translations isn’t loaded already
You will have to use the
$translateservice. Additionally, there will be found$translate.instant.If something “breaks”, you will have to show us the break. We cannot guess what you are doing at your place.