+(* Gettext support.
+ *
+ * Use s_ "string" to mark a translatable string, and f_ "string %s"
+ * to mark a format string (eg. for printf). There are other
+ * functions: see ocaml-gettext manual and GNU gettext info.
+ *
+ * Try not to mark strings which always go to the log file (eg.
+ * eprintf messages).
+ *)
+
+module P2VGettext = Gettext.Program (
+ struct
+ let textdomain = "virt-p2v"
+ let codeset = None
+ let dir = None
+ let dependencies = []
+ end
+) (GettextStub.Native)
+open P2VGettext
+
+let supported_langs =
+ (* Note these strings are NOT translated! *)
+ let nonasian_langs = [
+ "English", "en_US.UTF-8";
+ ] in
+ let asian_langs = [
+ "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E (Japanese)", "ja_JP.UTF-8"
+ ] in
+ (* Linux console doesn't support Asian or RTL languages. *)
+ let term = try getenv "TERM" with Not_found -> "" in
+ match term with
+ | "linux" -> nonasian_langs
+ | _ -> nonasian_langs @ asian_langs
+
+(*----------------------------------------------------------------------*)