u/elixon

▲ 4 r/webdev

[Showoff Saturday] My website now supports 28 fully localized languages

I finally shipped it.

Spent the last 2 weeks building a proper translation pipeline for a JS/PHP/HTML app. JS and PHP were easy with standard gettext tooling. HTML was the real nightmare. You know, rich text, links, bolds, nested HTML... And all had to work with AI translator reliably.

HTML translations are not just "replace string A with string B". You need:

  • translation context
  • surrounding sentences so translators understand intent
  • translator comments
  • support for wildly different word order
  • rich-HTML layouts that survive both tiny and huge translated text

Tons of small things like this one, see how translation for a homepage badge varies from language to language?

<small>Since</small> <b>2015</b>

<small>自</small><b>2015</b><small>年起</small>

<b>2015</b> <small>óta</small>

Same meaning. Different structure.

Then comes the fun part:

  • extracting all translatables from mixed HTML/JS/PHP
  • feeding dictionaries into AI
  • checking that AI did the job right
  • compiling translations back safely
  • not destroying the UI in the process

Add a language. Run one command. Entire app translated.

Seeing months of internationalization pain collapse into a single command feels slightly unreal.

🇨🇿 🇺🇸 🇨🇳 🇯🇵 🇩🇪 🇰🇷 🇫🇷 🇮🇱 🇵🇱 🇷🇺 🇪🇸 🇮🇳 🇮🇩 🇺🇦 🇮🇹 🇵🇹 🇳🇱 🇸🇪 🇹🇷 🇻🇳 🇹🇭 🇷🇴 🇭🇺 🇩🇰 🇫🇮 🇦🇪 🇳🇴 🇬🇷

reddit.com
u/elixon — 8 hours ago
▲ 3 r/ollama

Ollama Pricing Transparency

TLDR: the price depends on time, probably time of day, and may increase up to 10 times during the day!

I am still not sure what I am paying Ollama for. Last week I ran out of weekly limits while trying to auto translate my app. I was surprised how long a single sentence takes to translate, around 40 seconds. I had to wait until midnight for my weekly limits to reset, and since the translation is fully automated I have logs for every Ollama request. I also log basic stats returned by Ollama like prompt tokens and generated tokens.

So here are the numbers, grab your calculators and infer whatever you want from what I collected during 8 hours of running 3 simultaneous translation threads querying Qwen3.5:

TOTALS for 6.2 percent weekly allowance
req_time 47426.8
req_size 219985
response_tokens 1928844
prompt_tokens 370631

If my calculator is correct I got this for Qwen3.5:

Monthly limit on generated tokens: 133 million (from Monday midnight to 8 am)
Speed: 47 tokens per second

Note that the numbers are approximate since we do not know the exact formula and whether req_time plays a role. It is mainly for orientation.

Limits

Month = 4.29 weeks
Monthly allowance (cumullation of weekly limits): 429%
Qwen3.5 price:

Type per 6.2% weekly limits per month limit (429%)
Prompt tokens 370,631 25,645,274
Generated tokens 1,928,844 133,463,560
Request time 13.16 hrs 911 (38 days)

Speed

Phase Expected Time Share
Tokenization/parsing < 0.5%
Prefill/prompt processing 10% to 20%
Decode/generation 80% to 90%

Prefill:Decode≈1:6

Total time 47426 - 47426 * 1/7 = 40650 response generation time for 1928844 tokens => 1928844 / 40650 = 47 tokens/s

UPDATE:

It is still running and numbers changed significantly:

Current state:
12.2% weekly limit
req_time 55397.2
response_tokens 2116930
prompt_tokens 414251

New tokens
2,116,930 (now) − 1,928,844 (previous) = 188,086 new generated tokens

12.2 percent (now) − 6.2 percent (before) = 6 percent of weekly limit corresponds to 188,086 new generated tokens

Monthly limit: 188,086 / 6 × 429 = 13,448,149 tokens (previous estimate: 133M)

⚠️ That implies the effective price increased by about 1000% (!!!) over the last 2 hours (around 9 AM UTC).

reddit.com
u/elixon — 6 days ago