Skip to content

Feature/admin forth/1271/allow to select languages for #11

Merged
yaroslav8765 merged 10 commits intomainfrom
feature/AdminForth/1271/allow-to-select-languages-for-
Feb 24, 2026
Merged

Feature/admin forth/1271/allow to select languages for #11
yaroslav8765 merged 10 commits intomainfrom
feature/AdminForth/1271/allow-to-select-languages-for-

Conversation

@yaroslav8765
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread types.ts Outdated
* you can specify additional language codes to generate translations for.
* Example: sr-Latn for Serbian in Latin script, while primaryLanguage can be sr for Serbian in Cyrillic script.
*/
additionalTranslationBCP47?: SupportedLanguage[];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/**

  • Ask translator to treat some code from supportedLanguages as exact BCP47 tag. Read docs for details.
  • key - one of the values form supportedLanguages, value -BCP47 tag
    */

translateLangAsBCP47Code

@yaroslav8765 do we have validation supportedLanguages.includes(key)?

Comment thread types.ts
export interface PluginOptions {

/* List of ISO 639-1 language codes which you want to tsupport*/
supportedLanguages: SupportedLanguage[];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaroslav8765

  • List of ISO 639-1 language codes which you want to tsupport*/

->

  • List of language codes which you want to support. Can be either short ISO 639-1 language codes or/and BCP47 tags */

Comment thread index.ts Outdated
const prompt = `
I need to translate strings in JSON to ${langName} language (ISO 639-1 code ${lang}) from English for my web app.
${region ? `Use the regional conventions for ${lang} (region ${region}), including spelling, punctuation, and formatting.` : ''}
I need to translate strings in JSON to ${langName} language (ISO 639-1 code ${langIsoCode}) (BCP-47 code ${langCode}) from English for my web app.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mention BCP-47 to LLM don't mention ISO 639-1 - because BCP47 already includes it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should define exact const at top level which will say what we use bcp and or iso and use here

@yaroslav8765 yaroslav8765 merged commit 956d8d1 into main Feb 24, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants