Code Monkey home page Code Monkey logo

po-localization's Introduction

Codacy Badge

PO-Localization

This is a library designed to help C++ developers in creating Windows application to translate it on world languages. Project contains an utility to convert existing resources of application in PO-file and adds ability to use translated PO-files to application itself. The PO-file is a native format of poEdit (a very convenient application for translators).

Compression

Library can load translations in uncompressed or compressed formats (Lempel-Ziv algorithm only). Uncompressed files has ".po" extension and compressed ones has ".p_" extension. Compressed files can be produced by Microsoft File Compression Utility named "compress.exe". It can be found in any old Microsoft OS or Resource Kit. Usage example:

compress.exe you_application.exe.09.po you_application.exe.09.p_

Compressed files can be also inserted as resources (detected by magic number 'SZDD' at beginning of file).

Library uses WinAPI LZExpand library (Lz32.dll) to handle compressed files.

Note: Some versions of compress.exe produces incorrect compressed files (1 byte differ) just get another version of utility.

EXE to PO file converter usage

exe2po.exe {input file.exe} {output file.po}

NOTE: You can ease converter usage by dropping exe2po.exe to Windows folder and registering "Create PO" context menu by merging with "exe2po-register.reg" file (undo with "exe2po-unregister.reg" file).

Generated .po-file blocks for menu resources:

#: MENUPOPUP.{menu-id}.{ordinal}
msgid "English menu popup"
msgstr ""

#: MENUITEM.{menu-id}.{menu-item-id}
msgid "English menu item"
msgstr ""

Where {ordinal} is a number 0, 1, 2 etc.

Generated .po-file blocks for dialog box resources:

#: DIALOGCAPTION.{dialog-id}
msgid "English dialog caption"
msgstr ""

#: DIALOGCONTROL.{dialog-id}.{control-class}.{dialog-control-id}
msgid "English dialog control"
msgstr ""

Where {control-class} is a "Button", "Static" etc. If dialog control id is a 0xffff then {dialog-control-id} = ( 0x80000000 | ordinal ) where ordinal is a number 0, 1, 2 etc.

Generated .po-file blocks for string resources:

#: STRING.{string-id}
msgid "English string"
msgstr ""

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyrights

  • PO-Localization

Copyright (C) Nikolay Raspopov, 2011-2023.

https://www.cherubicsoft.com/en/projects/po-localization/

  • Microsoft (R) File Compression Utility Version 2.50

Copyright (C) Microsoft Corp. 1990-1994. All rights reserved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.