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

C# support for translation #117

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

LiviuNicolae
Copy link

I extended the actual implementation to extract keys from .cs files that are marked with "_translate" suffix (ex. public const string SuccessfullySaved_translate = "Successfully saved!";). This is useful when you want to have a single ".po" file for either client side and server side. I also extended the compile command and now generates also a .cs file having a dictionary with all the translations available in the generated .js file. So you can translate on the server side using Translations.Translate(key) method. I created the extract_csharp.js test file to test the extraction of the keys with _translate suffix. For compile, i don't have any idea how to test the generated .cs dictionary in javascript and if you have any suggestions it will be great for me. Hope this is an interesting feature for other people then me!

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.

1 participant