GithubHelp home page GithubHelp logo

Comments (7)

mdsitton avatar mdsitton commented on May 28, 2024

Basically most of the issues is having msvc find libintl.h (which i cant even find in the source distribution for gettext even though there is a intl library code in it)

I've found some other libraries that try to replicate gettext functionality in a few different ways
https://github.com/cbeck88/spirit-po

  • depends on boost so meh
  • po only
  • boost license.

https://github.com/tinygettext/tinygettext

  • Only uses po files
  • A fairly long running project (looks like it started in 2004)
  • An older forked version of this is also used in SuperTuxKart
  • Relatively small code base if we wanted to fork it internally.
    • the previous developer seems to have mostly abandoned it.
  • zlib license

Out of all of these i'd be most likely to use tinygettext.

The most annoying thing so far about gettext, it seems like whenever anyone asks about localization anywhere on the internet every single response is to just use gettext. None explain the process of getting it to work well cross platform. Practically every search result is from people using it from other languages... not C or C++. This alone makes me want to ignore it and take in a local fork of tinygettext, and modify it for our needs(like what SuperTuxKart did). Plus it could simplify the build process, and the process for making new translations(maybe I need to look into how its actually used to make a better say on that)

There are some other games and projects that are using it as well, so i think its something to look into.

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Well i agree on some things : Gettext is a pain in the ass to set up. I just experienced that.
That's weird to use directly po files, I'd like to see how TinyGettext benchmarks :p (a good point, it's a fairly active project)

from openrhythm.

mdsitton avatar mdsitton commented on May 28, 2024

Basically if we forked it it would just mainly be cleaning up some stuff, like using our logging, filesystem code. and maybe removing the dependency on inconv(we can just use UTF-8 encoded stuff and it should be fine)

Also here is where the dev said he doesnt really want to work on it anymore:
tinygettext/tinygettext#13

and the guy he gave commit access is a 0ad developer (which also uses tinygettext as far as i can tell)

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Btw, libintl.h is in glibc.
A lot of people are using Gettext with M$VC : http://stackoverflow.com/a/23146946/3888191
You have the developer files here : http://gnuwin32.sourceforge.net/packages/libintl.htm with a .dll.a and the header… I think it's enough ?
To be sincere I wouldn't want to add another dep (at least on Linux) as using .mo files is really perfectly integrated in Linux. But adding something for Windows, I don't care so using TinyGettext on Windows is good for me :p

from openrhythm.

mdsitton avatar mdsitton commented on May 28, 2024

Just fyi at some point I plan on bringing in https://github.com/fmtlib/fmt (its used in spdlog for log output). Because streams are terrible for translation purposes.

from openrhythm.

Salamandar avatar Salamandar commented on May 28, 2024

Seems cool stuff

from openrhythm.

mdsitton avatar mdsitton commented on May 28, 2024

I'm going to go ahead and post this copied directly from the long comment i created in main.cpp

Here is a few random alternatives i've found:

https://github.com/kaishiqi/I18N-Gettext-Supported
Haven't dug into much, MIT licensed cross platform, uses mo files.

https://github.com/tinygettext/tinygettext
tbh the code is pretty bad, and if we were going to use this it would only be as a beginning.
Uses po files.

https://github.com/laurent22/simple-gettext
GPL Licensed, mo file parser.

https://github.com/clawoo/mofilereader
MIT License, mo file parser. Only supports UTF-8 (Totally fine with me)

https://github.com/vslavik/poedit
Useful translation editor.

from openrhythm.

Related Issues (20)

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.