[LIBRARY] language.lua A simple string manager for localization in pure lua

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
alejandroalzate
Citizen
Posts: 67
Joined: Sat May 08, 2021 9:45 pm

[LIBRARY] language.lua A simple string manager for localization in pure lua

Post by alejandroalzate »

This is the second contribution to the community, since formatting a nice looking post for viewtopic.php?t=95418 was a pain i will just send you directly to the repositories to take a look the read me that should have enough info about it to get you started, since it's quite simple but saves the chore of making that stack of functions.

Get a copy here:
Github: https://github.com/alejandro-alzate/language-lua
or here:
Luarocks: https://luarocks.org/modules/alejandro-alzate/language

Code: Select all

target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: [LIBRARY] language.lua A simple string manager for localization in pure lua

Post by dusoft »

Any new open source library is welcome, so thanks.

I checked it and it seems similar to:
https://github.com/kikito/i18n.lua

Both yours and Kikito's will work great for smaller number of text strings. Once your need is in hundreds to thousands of strings (e.g. adventure game with lots of dialogs etc.), the format gets impractical to work with.

I prefer using POEdit for editing and then gettext or similar for actual translation. Gettext is well tested and offers full support of universal pluralization that works for any language. There are couple of gettext implementations in Lua and Lua with FFI.
alejandroalzate
Citizen
Posts: 67
Joined: Sat May 08, 2021 9:45 pm

Re: [LIBRARY] language.lua A simple string manager for localization in pure lua

Post by alejandroalzate »

dusoft wrote: Sun Feb 04, 2024 9:19 pm I checked it and it seems similar to:
https://github.com/kikito/i18n.lua
Didn't know he had one. dude this guy, zorg, and rxi are the literal pillars of most lua libraries out there :cry:

Code: Select all

target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: [LIBRARY] language.lua A simple string manager for localization in pure lua

Post by GVovkiv »

dusoft wrote: Sun Feb 04, 2024 9:19 pm Any new open source library is welcome, so thanks.

I checked it and it seems similar to:
https://github.com/kikito/i18n.lua

Both yours and Kikito's will work great for smaller number of text strings. Once your need is in hundreds to thousands of strings (e.g. adventure game with lots of dialogs etc.), the format gets impractical to work with.

I prefer using POEdit for editing and then gettext or similar for actual translation. Gettext is well tested and offers full support of universal pluralization that works for any language. There are couple of gettext implementations in Lua and Lua with FFI.
There also other good translation systems, such as Fluent https://projectfluent.org/fluent/guide/index.html
And lua implementation of it https://github.com/alerque/fluent-lua/issues, but, sadly, this one seems to be abandoned and not 100% feature completed
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: [LIBRARY] language.lua A simple string manager for localization in pure lua

Post by dusoft »

GVovkiv wrote: Tue Feb 06, 2024 6:05 pm
dusoft wrote: Sun Feb 04, 2024 9:19 pm Any new open source library is welcome, so thanks.

I checked it and it seems similar to:
https://github.com/kikito/i18n.lua

Both yours and Kikito's will work great for smaller number of text strings. Once your need is in hundreds to thousands of strings (e.g. adventure game with lots of dialogs etc.), the format gets impractical to work with.

I prefer using POEdit for editing and then gettext or similar for actual translation. Gettext is well tested and offers full support of universal pluralization that works for any language. There are couple of gettext implementations in Lua and Lua with FFI.
There also other good translation systems, such as Fluent https://projectfluent.org/fluent/guide/index.html
And lua implementation of it https://github.com/alerque/fluent-lua/issues, but, sadly, this one seems to be abandoned and not 100% feature completed
Nice library, I haven't know about this one. However the lua bindings seem quite limited and yes, it does not seem to be up to date.
Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests