3 ms·
I have a small framework I built for developing small web apps faster and it also has a translation engine very much like this, basically what it does is:
by betimsl 7y ago
I have a small framework I built for developing small web apps faster and it also has a translation engine very much like this, basically what it does is:
<span class="text-muted">$T(Detajet e blerësit)</span>
and it translates it to:
buf.WriteString(T(`Detajet e blerësit`))
T is a function that takes a string and returns a string from static map that gets built when app starts or when somebody translates a label.
- abhisiv 7y agoCool stuff! I would love to hear more about it. Please ping me at abhi@langapi.co if you want to talk.