ChilliCream / ChilliCream/graphql-platform

Localizable scalar type

Open
#6,288 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🌶️ hot chocolate 🗣 discussion Area: Scalars
Dominant language
C#
Stars
5.8k
Forks
810
Avg merge
15h 39m
Merged PRs (30d)
98

Description

Product

Hot Chocolate

Is your feature request related to a problem?

If your application supports two or more localizations/languages, I bet you have to deal with something like this
var name = culture == new CultureInfo('fr') ? nameFr : nameEng at least once.
Which is really annoying in case you have many such fields (or even one, meh)
We are not talking about some static resources, which can be translated using LocalizedString

The solution you'd like

What if we add some new scalar type / wrapper on string, which will be simply represented like String in resulted schema, so clients code do not even notice any magic, and hide all work with accessing current culture into this wrapper or middleware.
If you'd like the idea, I would be happy to discuss it and maybe implement

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not identify files, tests, or an entry point. Begin by clarifying how localized scalar values should be represented, resolved, and configured, then define the expected schema and runtime behavior before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.