repo.or.cz
/
lbook_fbreader.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
gui
[lbook_fbreader.git]
/
fbreader
/
moto
/
util
/
language_detector.cpp
blob
a68383176796e92ea0ba04749fc31a4820062b59
1
#include <iostream>
2
#include <string>
3
4
#include <zlanguage.h>
5
6
int
main
() {
7
std
::
string language
= (
const char
*)
ZLanguage
::
getSystemLanguageCode
().
utf8
();
8
language
.
erase
(
2
);
9
if
(
language
.
length
() !=
2
) {
10
language
=
"en"
;
11
}
12
std
::
cout
<<
language
;
13
return
0
;
14
}