Display translated help pages

Use an algorithm similar to gettext's locale resolution to find an
appropriate translation to display. Fall back to the English version.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2013-08-27 19:32:02 +02:00
parent ef0f9e6411
commit bd4f4a136f
3 changed files with 64 additions and 3 deletions

View File

@@ -872,6 +872,13 @@ int io_check_dir(const char *dir)
}
}
unsigned io_dir_exists(const char *path)
{
struct stat st;
return (!stat(path, &st) && S_ISDIR(st.st_mode));
}
unsigned io_file_exists(const char *file)
{
FILE *fd;