Feature/admin forth/1271/allow to select languages for #11
Merged
yaroslav8765 merged 10 commits intomainfrom Feb 24, 2026
Merged
Feature/admin forth/1271/allow to select languages for #11yaroslav8765 merged 10 commits intomainfrom
yaroslav8765 merged 10 commits intomainfrom
Conversation
…egrate with I18nPlugin
…to feature/AdminForth/1271/allow-to-select-languages-for-
…date UI for improved language selection
ivictbor
requested changes
Feb 24, 2026
| * 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[]; |
Contributor
There was a problem hiding this comment.
/**
- Ask translator to treat some code from
supportedLanguagesas 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)?
| export interface PluginOptions { | ||
|
|
||
| /* List of ISO 639-1 language codes which you want to tsupport*/ | ||
| supportedLanguages: SupportedLanguage[]; |
Contributor
There was a problem hiding this comment.
- 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 */
| 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. |
Contributor
There was a problem hiding this comment.
If you mention BCP-47 to LLM don't mention ISO 639-1 - because BCP47 already includes it
Contributor
There was a problem hiding this comment.
You should define exact const at top level which will say what we use bcp and or iso and use here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.