やっと自宅のPCを買い替え、Visual Studio 2019をインストール。
Visual Studio 2019 = .NET Core 3.0と思っていたら、プルダウンに出てこず調べたら未だPreview段階。
ここでインストールしてもまた入れ直す必要出てくるので、それまでの間Cordovaで遊ぼうと思ったらVisual Studio 2019から Apache Cordovaは消えたようです。Visual Studio CodeもしくはVisual Studio 2017を使えと。ずいぶんと思い切ったことをしてくれますね…。
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', ['ionic','pascalprecht.translate'])
.config(function($translateProvider){
$translateProvider.translations('en', {
hello_message: "Howdy",
goodbye_message: "Goodbye"
});
$translateProvider.translations('es', {
hello_message: "Hola",
goodbye_message: "Adios"
});
$translateProvider.translations('ja', {
hello_message: "こんにちは",
goodbye_message: "さようなら"
});
//$translateProvider.preferredLanguage("en");
$translateProvider.fallbackLanguage("en");
$translateProvider.useSanitizeValueStrategy('escape','sanitizeParameters')
})
.run(function($ionicPlatform, $translate) {
$ionicPlatform.ready(function() {
if(typeof navigator.globalization !== "undefined") {
navigator.globalization.getPreferredLanguage(function(language) {
$translate.use((language.value).split("-")[0]).then(function(data) {
console.log("SUCCESS -> " + data);
}, function(error) {
console.log("ERROR -> " + error);
});
}, null);
}
if(window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
// Don't remove this line unless you know what you are doing. It stops the viewport
// from snapping when text inputs are focused. Ionic handles this internally for
// a much nicer keyboard experience.
cordova.plugins.Keyboard.disableScroll(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})