Skip to content

Commit

Permalink
api.vala: simplify enchant_get_user_language
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed May 4, 2024
1 parent 2ab15a7 commit f40216f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/api.vala
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public unowned string enchant_get_version() {

public string enchant_get_user_language() {
// The returned list always contains "C".
string[] languages = Intl.get_language_names();
assert(languages != null);

unowned string[] languages = Intl.get_language_names();
return languages[0] == "C" ? "en" : languages[0];
}

0 comments on commit f40216f

Please sign in to comment.