Comments (15)
Hello @nicksnyder @abourget and @ghost
I recently completed a package locales that may be of use. I created it for use in my own i18n package, but split the code into it's own repo in order for any other i18n or l10n package to use if they wanted.
My goal is to create a central package for locale information and formatting and have people wrap it as they wish.
All information is generated using the CLDR rules and information.
It features:
- Rules generated from the latest CLDR data, v29
- Cardinal, Ordinal and Range Plural Rules
- Month, Weekday and Timezone translations built in
- Date & Time formatting functions
- Number, Currency, Accounting and Percent formatting functions
I hope this can help π
from go-i18n.
This library does not currently handle date and number formatting. If we added support, I ideally would want to generate the code from the CLDR data much like we do for plural configuration.
from go-i18n.
CLDR data has all of that ? I don't know much about CLDR but I might be
willing to take a bite at it. Do you have references ?
Le sam. 9 janv. 2016 17:45, Nick Snyder [email protected] a Γ©crit :
This library does not currently handle date and number formatting. If we
added support, I ideally would want to generate the code from the CLDR data
much like we do for plural configuration.β
Reply to this email directly or view it on GitHub
#45 (comment).
from go-i18n.
Number formatting:
http://cldr.unicode.org/translation/number-patterns
Date formatting
http://cldr.unicode.org/translation/date-time-patterns
http://cldr.unicode.org/translation/date-time-patterns
Download the raw XML data files here:
http://unicode.org/Public/cldr/28/core.zip
Look at core/common/main/en.xml (search for dateFormatItem and decimalFormats)
from go-i18n.
any movement on this ?
from go-i18n.
Not that I am aware of. If this is something that is of interest to you then feel free to work on it.
from go-i18n.
Yeah I'd be glad if you do :-)
Le dim. 26 juin 2016 15:15, Nick Snyder [email protected] a Γ©crit :
Not that I am aware of. If this is something that is of interest to you
then feel free to work on it.β
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#45 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFs8DIgEaE6I3DzdHOPy-_JWIY9eSVVks5qPs_PgaJpZM4HBoV9
.
from go-i18n.
Have you seen this ? Its handles l10n according to the readme.
https://github.com/maximilien/i18n4go
- is a full workflow, which i was looking for.
- is up to the language translation team to do it.
Its using this repo as a dependency.
Seems to me like a great approach, and well done
from go-i18n.
@abourget
i am also starting work on this with another guy.
also there is some great best pracs here:
https://github.com/astaxie/build-web-application-with-golang/blob/master/en/10.1.md
about 6 pages, that i think we will fully integrate so everyone has options.
from go-i18n.
weird. golang has first class support for using the cldr xml data
https://godoc.org/golang.org/x/text/unicode/cldr
funny that the golang team did not use this to create first class tooling for us already.
mhhh.... anyone knwo why ?
from go-i18n.
Wow thats great! Thanks for sharing here.
On Tue, Sep 13, 2016, 8:49 AM Dean Karn [email protected] wrote:
Hello @nicksnyder https://github.com/nicksnyder @abourget
https://github.com/abourget and @ghost https://github.com/ghostI recently completed a package locales
https://github.com/go-playground/locales that may be of use. I created
it for use in my own i18n package, but split the code into it's own repo in
order for any other i18n or l10n package to use if they wanted.My goal is to create a central package for locale information and
formatting and have people wrap it as they wish.All information is generated using the CLDR http://cldr.unicode.org/
rules and information.It features:
- Rules generated from the latest CLDR
http://cldr.unicode.org/index/downloads data, v29- Cardinal, Ordinal and Range Plural Rules
- Month, Weekday and Timezone translations built in
- Date & Time formatting functions
- Number, Currency, Accounting and Percent formatting functions
I hope this can help π
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#45 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFs8OHMOJ50qb2ZwiancbjtM-63TeQ1ks5qppvsgaJpZM4HBoV9
.
from go-i18n.
Wondering what i should use now ?
this repo OR https://github.com/go-playground/universal-translator ?
from go-i18n.
Is there any updates on this, or if no one is working on it, are there at least smaller bits of it that I could pick up and implement?
from go-i18n.
I don't know if anyone is working on this @SCKelemen
But in theory all that would have to be done to get l10n working in this project would be to map the locales from this library to the locales in https://github.com/go-playground/locales, which contains l10n functions.
from go-i18n.
The focus of this library is translating messages.
For other types of localization check out http://golang.org/x/text or other 3rd party libraries mentioned in this thread.
from go-i18n.
Related Issues (20)
- How to write a library module designed to be consumed by clients requiring i18n support?
- go get -u "github.com/nicksnyder/go-i18n/v2/i18n" # cd /root/go/GOCODE/src/github.com/nicksnyder/go-i18n; git pull --ff-only HOT 2
- Please explain how the user's current language is selected at runtime
- Is there are way to properly handle translation based on gender HOT 1
- Error handling is faulty HOT 3
- Setting the delimiters globally? HOT 2
- How to generate translations for the toml files HOT 3
- Upgrade golang.org/x/text v0.3.8 HOT 1
- `goi18n extract` doesn't seem to work for source file that use generics HOT 3
- Cound you export this function or when translation has error get the original value HOT 7
- Hook to commonly catch errors HOT 4
- Just a review
- Easy wrapper around this library HOT 1
- List fitting problem HOT 3
- merging new translation into existing translations omits the hashes
- [Question] Is there any way for reverse lookup in bundle? HOT 1
- Upgrade golang.org/x/text HOT 1
- Breaks on key description HOT 1
- Expose fields (or add access methods) of MessageNotFoundErr HOT 4
- Support template.Options for setting up missing key behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-i18n.