

[Golang] Convert PO file to JSON Format
source link: http://siongui.github.io/2016/01/27/go-convert-po-file-to-json/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Sample PO files
In this example, we support two locale, zh_TW (Traditional Chinese) and vi_VN (Vietnamese). The zh_TW PO file are located at locale/zh_TW/LC_MESSAGES/messages.po and vi_VN PO file are located at locale/vi_VN/LC_MESSAGES/messages.po.
zh_TW PO file locale/zh_TW/LC_MESSAGES/messages.po:
messages.po | repository | view raw
# Chinese translations for PACKAGE package. # Copyright (C) 2013 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Automatically generated, 2013. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-06-04 10:20+0800\n" "PO-Revision-Date: 2013-03-10 05:19+0800\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" msgid "Home" msgstr "首頁" msgid "Canon" msgstr "經典" msgid "About" msgstr "關於" msgid "Setting" msgstr "設定" msgid "Translation" msgstr "翻譯"
vi_VN PO file locale/vi_VN/LC_MESSAGES/messages.po:
messages.po | repository | view raw
# Vietnamese translations for PACKAGE package. # Copyright (C) 2013 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Automatically generated, 2013. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-06-06 23:05+0800\n" "PO-Revision-Date: 2013-06-06 22:50+0800\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "Home" msgstr "Trang chính" msgid "Canon" msgstr "Kinh điển" msgid "About" msgstr "Giới thiệu" msgid "Setting" msgstr "Thiết lập" msgid "Translation" msgstr "Dịch"
Recommend
-
15
PowerShell script to convert CSV file format to Complex Nested JSON by Kapil Khandelwal · August 11, 2021 · 10 Views Frequently, we get raw d...
-
10
How to Convert ePub file to PDF Format on Linux CLIAre you looking for a way to convert an EPUB format file to a PDF file on the Linux command line interface?. EPUB is an e-book file format that uses the “.epub” file extensio...
-
5
Read Excel File in JSON Format Using Nodejs This tutorial help to read excel file using nodejs. We’ll let you know to read the excel file in JSON format and insert it into MySQL data or NoSQL database using rest API.
-
7
-
9
[Golang] Convert File Encoding From Big5 to UTF-8 March 21, 2016 ...
-
10
Introduction Write a Python program to convert PO files to J...
-
5
[Golang] Save Variables of Any Type in JSON file January 31, 2016
-
1
Automatically convert Traditional Chinese (zh_TW)
-
3
How to format large JSON file in command linePosted on 2023, Jun 11 One min readThere are several tools that can be used to format the large json file.Prettier (if...
-
9
Why Is It Crucial to Convert Word to PDF File Format? General In this mo...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK