First off, the locale switcher needs to be buried in the footer, with the locale provided by the browser request and automatically getting the units and language right. This will work for most people but there will be the theoretical use cases of the person on a VPN using a computer in a public library in Burkina Faso. Yes, you will need to have things going on in the backend to do this, but think of the user experience!
As for my critique of localisation, I would say that this is more of a critique of the USDA database (and LLMs) rather than a critique of your skilled efforts to make a beautiful website. Furthermore, this critique is from the UK, and other no-American English speakers, for example in Australia, might think I am being unreasonable. However, honest feedback and an idea of what you could do with that dubious USDA data, to make it work for people visiting the USA, in the happier times that should be coming soon...
In the UK we have labelling standards that are fairly similar to what goes in the EU. We list carbohydrates per 100g and per portion size, with sugars broken out separately. This is clear. With Nutrepedia I am wondering what a carbohydrate is. We list fibre as its own thing, not as a carbohydrate.
I don't believe the LLM wall of waffle text adds any value whatsoever. You are just wasting people's time and sending people into deep sleep with that slop. Nobody likes to read AI slop, particularly if it is useless, as is the case here. Harsh, I know, and opinion, I know, but AI slop is out there with 'horoscopes' as not worth reading.
I looked up 'haricot beans' because they are extremely popular in the UK, albeit in Baked Beans form. Ask for 'haricot beans' in a supermarket and nobody will be able to tell you where they are, even though there could be a whole aisle of the things.
Haricot beans are navy beans in the US and they are notable for phosphatidylserine. Unless you are eating offal, there isn't a better source of phosphatidylserine than haricot beans. Yet, despite the wall of LLM slop, no mention of phosphatidylserine or whether this matters (allegedly phosphatidylserine is important for cell wall strength and you can get snake-oil-supplements if you are gullible).
Then there is the small matter of cholesterol. Not present in haricot beans because plants don't do cholesterol. However, why not explicitly state the big zero? You have cholesterol listed if I look up beef.
I am also not sure that I would describe a bean as a seed. What is the difference between a bean and a seed? Why not call it a grain? Or a nut? Or a plant-fetus?!?
I suppose a bean is a seed, but, for legumes, beans are beans, not seeds. It is 'baked beans' not 'baked seeds'. Coupled to this is the gym-bro-influencer on the carnival barker diet that has a biological hatred of 'seed oils', so 'seed' is already a controversial word in the world of gym-bro 'science'.
The search did return navy beans for the keywords 'haricot beans', but the results were different when I switched to my chosen locale. In fact, with the same search terms, I had three different result sets and no way of going back to the search page to see how the LLM gaslighting was going.
The big long list of amino acids cribbed from USDA in the full details was also perplexing. Which ones are essential and which ones can be made by 'liver gymnastics'?
Why does this matter? Beans and rice. Beans have some essential amino acids in abundance but not all, same with rice. So you need to mix and match.
Nit-picking at the navy beans seems unfair, but they are listed as 'boiled without salt'. So I look for the words 'salt' or 'sodium' and can't find the entry.
In the UK it is all about HFSS (High fat, sugar and salt). You can get salty plants, e.g. samphire, as consumed by people that watch the TV show 'Masterchef'. Therefore, it should not be assumed that salt (UK) or sodium (simplified English) needs to listed, even if the result is zero.
We have a traffic light system for HFSS on most foods. Haricot beans should be green for everything, whereas beef is going to be red for saturated fat. They don't have traffic light food labels in the USA because freedom, however, that is the important summary on the front of the pack.
Most American food is either banned or boycotted in the UK and Europe. US agricultural commodity crops just go into animal feed, to fatten animals kept in captivity. Therefore, everything on the USDA database is not applicable outside of the land of the burger.
This is particularly true for processed foods. An internationally recognised product such as a a KitKat bar will be formulated very differently for British tastes to European or American tastes. In the UK, HFSS rules will come into play, so the USDA values don't apply, even at the macro nutrient level.
Incidentally, according to the USDA there are FIVE macro nutrients, not three.
Since there is no attribution to USDA or wherever the pictures come from, with no links to describe what some of the micro nutrients are, does this help anyone? Is the content misleading to an international audience? I would say so.
So, what to do?
IMHO the USDA data is garbage as far as the rest of the world is concerned. It won't be possible to shoehorn it into a form even for a British audience any more than an American pick up truck makes sense on a British road. As for our cousins in countries that don't have English as their first language, you have your work cut out there.
Consider asking questions about whom the user is, and what their pain points are. The international traveller going to the USA could be that user you want. I know nobody is going to the US these days but times change and people will be back.
It's a multilingual nutrition reference site: 1,635 foods rendered into 47,415 localized pages across 29 regional locales. Each page has nutrition facts, localized names, portion terms, regional routing, imagery, and short food context.
The stack is Clojure, HTTP-Kit, Compojure, Hiccup, HTMX, and Postgres. Postgres handles the food data, localized content, admin workflow, task queues, search, and evaluation records.
The search piece has been the most interesting technically. Latin-script fuzzy search uses pg_trgm and unaccent. CJK and other non-Latin scripts use PGroonga. Romanized aliases are indexed separately, so a query like "rasbhari" can find a Hindi food name like "rasbhari" / "रसभरी".
I built this because most nutrition tools feel calorie-first, signup-first, and English focused. I wanted the reference layer to be free and useful before asking anyone to track meals or create an account.
I'd especially appreciate feedback on search, localization mistakes, whether the pages are useful before tracking exists, and any obvious technical blind spots.
First, what is the benefit of using this over something established like fddb or any already existing nutritional app?
Second, just translating the words for the units (like cup) doesn't work, because for example while "szklanka", the Polish word for glass, is indeed used in Polish recipes, there it means more something along the lines of "just grab whatever standard glass you have, it will be fine". It explicitly does not mean a unit of measurement of 236 ml.
Third, since you are using a US source you fall into the trap of US defaultism here. The way carbohydrates are labeled is different around the world and I think only the US does this weird thing where you have to manually subtract the dietary fiber from the total carbohydrates. This matters because you essentially give non-US users (and definitely users from the EU) plainly incorrect amounts of labeled carbohydrates.
All in all, cute project and good on you trying to tackle it. It looks okay though the AI smells bother me personally, but I don't think nutritional data is a great place to start for such a project and honestly I will not remember your site in a few days anymore.