#include <conio.h>
#include <windows.h>
#include <iostream>
#include <vector>
#include <string>
enum ID_STRING : int
{
ID_FILE = 0,
ID_OPEN,
ID_SAVE,
ID_CLOSE,
COUNT_ID
};
std::vector<std::string> vLangRU
{
"Фаил",
"Открыть",
"Сохранить",
"Закрыть"
};
std::vector<std::string> vLangEN
{
"File",
"Open",
"Save",
"Close"
};
bool bRus = false;
std::string OutLangString(int id)
{
if (bRus == true)
return vLangRU[id];
return vLangEN[id];
}
int main()
{
setlocale(LC_CTYPE, "rus");
SetConsoleTitleA("Console");
std::cout << " Eng" << std::endl;
bRus = false;
for (size_t i = 0; i < COUNT_ID; i++)
{
std::cout << OutLangString(i).c_str() << std::endl;
}
std::cout << std::endl << " Rus" << std::endl;
bRus = true;
for (size_t i = 0; i < COUNT_ID; i++)
{
std::cout << OutLangString(i).c_str() << std::endl;
}
std::cout << std::endl << " Selected ID" << std::endl;
std::cout << OutLangString(ID_SAVE).c_str() << std::endl;
std::cout << OutLangString(ID_FILE).c_str() << std::endl;
_getch();
return EXIT_SUCCESS;
}