Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow generic translation mechanisms #280

Open
hbons opened this issue Jul 15, 2020 · 0 comments
Open

Allow generic translation mechanisms #280

hbons opened this issue Jul 15, 2020 · 0 comments

Comments

@hbons
Copy link
Member

hbons commented Jul 15, 2020

We should allow users to easily hook up their own translation mechanisms. In code generation, we allow to check "Make strings translatable".

This wraps all generated strings a translation method, e.g. Strings.Get("Done").

We should also generate the boilerplate class Strings.cs for the user to implement. Something like:

using MyTranslationLibrary;

class Strings
{
    public static string Get(string s)
    {
         // User implements their own translation mechanism here
         return s;
    }
}

This class will not be overwritten by updates.

@hbons hbons added this to the 1.0.0 – ⚙️ Toolkits ready milestone Jul 16, 2020
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

No branches or pull requests

1 participant