msgid""msgstr"""Project-Id-Version: My Project 1.0\n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2024-10-01 12:00+0000\n""PO-Revision-Date: 2024-10-02 14:00+0000\n""Last-Translator: John Doe <john@example.com>\n""Language-Team: French <team@example.com>\n""Language: fr\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"
# SOME DESCRIPTIVE TITLE.# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER# This file is distributed under the same license as the PACKAGE package.# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.##, fuzzymsgid""msgstr"""Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2025-01-04 17:06+0800\n""PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n""Last-Translator: FULL NAME <EMAIL@ADDRESS>\n""Language-Team: LANGUAGE <LL@li.org>\n""Language: \n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=CHARSET\n""Content-Transfer-Encoding: 8bit\n"#: main.cpp:14msgid"Hello, world!"msgstr""#: main.cpp:15msgid"Welcome to my C++ project."msgstr""
# Chinese translations for PACKAGE package.# Copyright (C) 2025 THE PACKAGE'S COPYRIGHT HOLDER# This file is distributed under the same license as the PACKAGE package.# <ken@laptop-44oc4fg2.>, 2025.#msgid""msgstr"""Project-Id-Version: PACKAGE VERSION\n""Report-Msgid-Bugs-To: \n""POT-Creation-Date: 2025-01-04 17:06+0800\n""PO-Revision-Date: 2025-01-04 17:07+0800\n""Last-Translator: <ken@laptop-44oc4fg2.>\n""Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n""Language: zh_CN\n""MIME-Version: 1.0\n""Content-Type: text/plain; charset=UTF-8\n""Content-Transfer-Encoding: 8bit\n"#: main.cpp:14msgid"Hello, world!"msgstr"你好,世界!"#: main.cpp:15msgid"Welcome to my C++ project."msgstr"欢迎来到我的 C++ 项目。"
usegettextrs::{gettext,LocaleCategory};fnmain(){// 设置语言环境gettextrs::setlocale(LocaleCategory::LcAll,"zh_CN.UTF-8");gettextrs::bindtextdomain("myapp","./locales").unwrap();gettextrs::textdomain("myapp").unwrap();// 翻译文本println!("{}",gettext("Hello, world!"));println!("{}",gettext("Welcome to my Rust project."));}