Last active
February 9, 2019 05:18
-
-
Save LouisWayne/0b54629fab788c111906ee7246e520a9 to your computer and use it in GitHub Desktop.
북미 아이온 언어 변경 (한국어, 영어) Node JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* AION Language Changer | |
* Run with NodeJS | |
*/ | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const FILE_DATA_ENG = 'D:/Games/Aion/L10N/enu/data/data.pak'; | |
const FILE_DATA_KOR = FILE_DATA_ENG + '_backup'; | |
const FILE_TEXTURE_ENG = 'D:/Games/Aion/L10N/enu/textures/textures.pak'; | |
const FILE_TEXTURE_KOR = FILE_TEXTURE_ENG + '_backup'; | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
rl.question('Change Language: Korean[0], English[1] // Enter Number: ', (answer) => { | |
switch (answer) { | |
case '0': | |
console.log('English to Korean...'); | |
changeToKorean(); | |
break; | |
case '1': | |
console.log('Korean to English...'); | |
changeToEnglish(); | |
break; | |
default: | |
console.log('Not supported input.'); | |
break; | |
} | |
rl.close(); | |
}); | |
function changeToKorean() { | |
fs.rename(FILE_DATA_ENG, FILE_DATA_KOR, function(err) { | |
if (err) { | |
console.error('ERROR: ' + err); | |
} | |
}); | |
fs.rename(FILE_TEXTURE_ENG, FILE_TEXTURE_KOR, function(err) { | |
if (err) { | |
console.error('ERROR: ' + err); | |
} | |
}); | |
} | |
function changeToEnglish() { | |
fs.rename(FILE_DATA_KOR, FILE_DATA_ENG, function(err) { | |
if (err) { | |
console.error('ERROR: ' + err); | |
} | |
}); | |
fs.rename(FILE_TEXTURE_KOR, FILE_TEXTURE_ENG, function(err) { | |
if (err) { | |
console.error('ERROR: ' + err); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment