Files
fastfetch/src/modules/locale.c
T
2021-02-27 18:30:05 +01:00

17 lines
428 B
C

#include "fastfetch.h"
void ffPrintLocale(FFinstance* instance)
{
if(ffPrintCachedValue(instance, "Locale"))
return;
char locale[256];
ffParsePropFile("/etc/locale.conf", "LANG=%[^\n]", locale);
if(locale[0] == '\0')
{
ffPrintError(instance, "Locale", "\"LANG=%[^\\n]\" not found in \"/etc/locale.conf\"");
return;
}
ffPrintAndSaveCachedValue(instance, "Locale", locale);
}