@echo off
chcp 65001 >nul
title Aion GGWP - English language fix
set "D=%~dp0"
echo.
echo  ====================================================
echo   Aion GGWP - switch client to ENGLISH
echo  ====================================================
echo.
echo  Folder: %D%
echo.
if not exist "%D%Strings.pak" ( echo  ERROR: Strings.pak missing next to this .bat & pause & exit /b 1 )
if not exist "%D%bin64" if not exist "%D%bin32" (
  echo  WARNING: this does not look like the Aion folder.
  echo  Put EN-FIX files into your Aion folder ^(where bin64 / l10n are^) and run again.
  echo.
)
if not exist "%D%Data\Strings"        mkdir "%D%Data\Strings"        2>nul
if not exist "%D%l10n\ENG\Data\Strings" mkdir "%D%l10n\ENG\Data\Strings" 2>nul
echo  Backing up current files (.bak_lang)...
if exist "%D%Data\Strings\Strings.pak"          copy /y "%D%Data\Strings\Strings.pak"          "%D%Data\Strings\Strings.pak.bak_lang" >nul
if exist "%D%l10n\ENG\Data\Strings\Strings.pak" copy /y "%D%l10n\ENG\Data\Strings\Strings.pak" "%D%l10n\ENG\Data\Strings\Strings.pak.bak_lang" >nul
if exist "%D%l10n\ENG\Data\zData.pak"           copy /y "%D%l10n\ENG\Data\zData.pak"           "%D%l10n\ENG\Data\zData.pak.bak_lang" >nul
echo  Installing English packs...
copy /y "%D%Strings.pak" "%D%Data\Strings\Strings.pak"          >nul && echo   [ok] Data\Strings\Strings.pak
copy /y "%D%Strings.pak" "%D%l10n\ENG\Data\Strings\Strings.pak" >nul && echo   [ok] l10n\ENG\Data\Strings\Strings.pak
copy /y "%D%zData.pak"   "%D%l10n\ENG\Data\zData.pak"           >nul && echo   [ok] l10n\ENG\Data\zData.pak
echo.
echo  DONE. The client is now fully English. Start the game.
echo  (To undo: rename the .bak_lang files back.)
echo.
pause
