Norwegian is identified as `no` by the locale detector agent; supported content localization locales include `nb_NO`

This leads to topics written in Norwegian (identified as no) being sent for translation to Norwegian (identified as nb_NO).

This is a little confusing, because the topic content stays mostly the same, but there are subtle differences. And it uses unnecessary credits.

Input / user:

{"content":"Man bare skriver posten, også sendes den avgårde til ChatGPT for å bli oversatt til de språk som er valgt. Så blir den vist i det språket som brukeren har valgt i sin profil. Men kan man alltid velge å slå av oversettelsene da.","target_locale":"nb_NO"}

Output / assistant:

{
  "output": "Man bare skriver innlegget, også sendes det av gårde til ChatGPT for å bli oversatt til språkene som er valgt. Så blir det vist på språket som brukeren har valgt i profilen sin. Men kan man alltid velge å slå av oversettelsene da."
}

2 לייקים

Thanks for the report. We’ll have a look.

It’ll likely include a prompt update into core, but if you would like a quick fix you can duplicate your current agent for locale detection and update the prompt for it to use nb_NO when it comes to Norwegian.

2 לייקים

By adding something similar to these list items in the system prompt?

  • Brazilian Portuguese: pt-BR
  • Simplified Chinese: zh-CN

Or is something more specific needed like:

Always use language code nb_NO for Norwegian

Thanks for the quick response :slight_smile:

לייק 1

So, adding the following under “list of common language codes” seems have have resolved it:

- Norwegian: nb-NO
- Norwegian Bokmål: nb-NO

I first tried with nb_NO but that seemed to confuse the system…

2 לייקים

Yes that’s right!

That’s great to hear.

I’ll be updating the generic system prompt here to take in the ‘supported languages’ setting just so it doesn’t have the same issue you’re facing for other communities.

לייק 1