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
[LIBRARY] language.lua A simple string manager for localization in pure lua
-
- Citizen
- Posts: 67
- Joined: Sat May 08, 2021 9:45 pm
[LIBRARY] language.lua A simple string manager for localization in pure lua
Code: Select all
target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
Re: [LIBRARY] language.lua A simple string manager for localization in pure lua
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.
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.
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
-
- Citizen
- Posts: 67
- Joined: Sat May 08, 2021 9:45 pm
Re: [LIBRARY] language.lua A simple string manager for localization in pure lua
Didn't know he had one. dude this guy, zorg, and rxi are the literal pillars of most lua libraries out theredusoft wrote: ↑Sun Feb 04, 2024 9:19 pm I checked it and it seems similar to:
https://github.com/kikito/i18n.lua
Code: Select all
target = boardIndex.getWhosPeekingThisLine()
target:setObey(true)
Re: [LIBRARY] language.lua A simple string manager for localization in pure lua
There also other good translation systems, such as Fluent https://projectfluent.org/fluent/guide/index.htmldusoft 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.
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
Re: [LIBRARY] language.lua A simple string manager for localization in pure lua
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.GVovkiv wrote: ↑Tue Feb 06, 2024 6:05 pmThere also other good translation systems, such as Fluent https://projectfluent.org/fluent/guide/index.htmldusoft 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.
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
My boat driving game demo: https://dusoft.itch.io/captain-bradley- ... itius-demo
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest