Hacker News new | ask | show | jobs
by haydenkshaw 2109 days ago
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.

3 comments

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.
Not an English speaker but this is still awkward: I always think "i18n" expands to 18 characters until I see your comment and checked `"internationalization".length` in console to be 20
yeah 18 is replacing the middle 18 characters in the word, not including that i and n at the ends. I personally don't like it because it's just an English speaking programmer in-group shibboleth that has bled over to k8s for kubernetes and a16z for Andreessen-Horowitz
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 :)

This is like a11y - "accessibility" a[eleven letters]y - https://www.a11yproject.com/
As abbreviations go, a11y is a quiet masterpiece, being simultaneously a numeronym, a homograph, a domain-relevant noun, and an Internet in-joke.

I'd hope that whosoever dreamed it up, went home for lunch and never returned.

With the best will in the world, I'd struggle to rate this a18n in the same ballpark of poetic genius as a11y.

a8y