Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nimterlingua for i18n #42

Open
juancarlospaco opened this issue Jan 18, 2019 · 3 comments
Open

Nimterlingua for i18n #42

juancarlospaco opened this issue Jan 18, 2019 · 3 comments
Labels
enhancement New feature or request roadmap Future of NimWC

Comments

@juancarlospaco
Copy link
Collaborator

juancarlospaco commented Jan 18, 2019

https://moigagoo.svbtle.com/loco-localization-package-for-nim
https://github.com/moigagoo/loco#loco-localization-package-for-nim
https://moigagoo.github.io/loco/loco.html

Research and try the solution for potential inclusion on the future.
Just 1 macro so should be easy to add. I can do Spanish.
The idea is to move all strings into 1 file with Loco DSL.
🤔

@juancarlospaco juancarlospaco added question Further information is requested roadmap Future of NimWC labels Jan 18, 2019
@juancarlospaco juancarlospaco added enhancement New feature or request and removed question Further information is requested labels Jan 27, 2019
@ThomasTJdev
Copy link
Owner

It looks nice - I will try some testcases. Currently I'm using a hacked-up version.

@juancarlospaco
Copy link
Collaborator Author

Loco generates 1 proc for every string multiplied by every language, on namespace on runtime. 🤔

This code:

import loco, macros

expandMacros:
  loco en:
    hello: "hello"

Produces this code at runtime:

import loco, macros, en

func hello(): string =
  result = "hello"

I coded this solution I think can be better:
https://github.com/juancarlospaco/nim-nimterlingua#example

@juancarlospaco juancarlospaco changed the title Loco for i18n Nimterlingua for i18n Jan 28, 2019
@ThomasTJdev
Copy link
Owner

Ohh, now my question ended up in the nimterlingua repo: juancarlospaco/nim-nimterlingua#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request roadmap Future of NimWC
Projects
None yet
Development

No branches or pull requests

2 participants