WraitheDX / realms_shattered

This is a CLI (command line interface) text RPG programmed in C++.
11 stars 6 forks source link

Handling of supported languages #37

Closed WraitheDX closed 4 years ago

WraitheDX commented 4 years ago

Need a proper way to handle what languages are supported and available for the user to select during language select.

Currently language select function holds hard-coded vector of supported languages. Language select returns two-character language value to config file struct, which is then pasted in between the language file names, Ex: text_load( "data/language/" + config_file.m_language + "_game_text.txt"

Even if the language is supported, we should ensure that the language file is present and not deleted. Maybe instead of hardcoding those values, look through the language folder, and add in the two-character language prefix only if all language files are present for that prefix?

WraitheDX commented 4 years ago

Marking this issue as closed as it seems wasteful to spend extra effort to catch errors likely caused by end user deleting/altering files.