Live data from Hacker News

Show HN: a18n – Automated I18n JavaScript Solution

github.com

1–10 of 27 posts

Re: Show HN: a18n – Automated I18n JavaScript Solution

#6
From what I can tell, this scans code for strings that can be translated, and then you supply translations from the initial language resulting in a mapping of Chinese to other languages (using Chinese as an example).

What happens if you update that initial translation that every other language hooks off? Do you end up with orphans? At the same time, you may not speak all your languages so you may end up with no -equivalent messages too.

Re: Show HN: a18n – Automated I18n JavaScript Solution

#7

Not sure on the name a18n, because it looks like a numeronym, like i18n is, but doesn't seem to be, had me trying to guess what the 18 characters are between a and n. I get it's a18n like Automated18n like AutomatedI18n.

Thanks! Yes, Automation is what actually I thought of the 'a' in a18n :) But it's named as `a18n` for some complicated reasons:

1. It aligns well with translation function name and CLI command

I want the translation function to be something:

- looks like `i18n` (so user can tell its purpose at a glance)

- but NOT `i18n` (so it's unique enough that we can safely assume its role when we parse/manipulate user's code)

- also NOT too short like '_', or 'i' (for the same reason above)

By these rules, I think `${someChar}18n` is a great fit as the function name, and to simplify things, I just use it as the CLI name and the package name.

2. (the real reason) It's really hard to name a JavaScript i18n lib today

If you search for "i18n" in npm, more that 7000 libs pops up. Here is a list of lib names I searched and found taken:

- simple-i18n

- i18n-simple

- s18n

- v18n

- next-i18n

- i18n-next

- react-i18n

- i18n-react

- ...(maybe 20 more?)

So when I finally found that `a18n` is not taken? -- I know instantly it's a digital treasure that I have to grab :)

Re: Show HN: a18n – Automated I18n JavaScript Solution

#9

Not sure on the name a18n, because it looks like a numeronym, like i18n is, but doesn't seem to be, had me trying to guess what the 18 characters are between a and n. I get it's a18n like Automated18n like AutomatedI18n.

This is like a11y - "accessibility" a[eleven letters]y - https://www.a11yproject.com/

Re: Show HN: a18n – Automated I18n JavaScript Solution

#10

Not sure on the name a18n, because it looks like a numeronym, like i18n is, but doesn't seem to be, had me trying to guess what the 18 characters are between a and n. I get it's a18n like Automated18n like AutomatedI18n.

I naturally assumed, and by naturally I mean egrep '^a.{18}n$' /usr/share/dict/words, that a18n abbreviated anthropomorphization, and so in context that perhaps we'd be helping a recently translated program feel more settled in its new repository.
Post reply on HN