-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add Full Language Version #509
Comments
Very interesting and clever approach! Thanks for the suggestion. I'm not sure if we want to go this way, for a variety of reasons, but it's definitely worth thinking about/adapting. Some comments:
|
Hmm, I think there might be another way to do it. {"en":"sth","fr":"sth","zh":"某些内容"} Then adapt the js code of the template according to the language selected by the user We can use the project of anki-persistence, but the disadvantage is that every time the user learns, the language has to be manually configured. Just like a menu? My current method is actually because I don't know how to embed the same piece of js into each html template through brain-brew. After all, the code is actually the same.
I think it's great On the other hand, there may indeed be situations where the language the user wants to use and the system language are inconsistent. But I guess we can also output the single language versions at the same time. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I think the key point here is about localising the note templates (the phrases "Capital", "Capital info" etc. themselves), rather than the contents. AFAIU it being dynamic is an implementation detail. We could have the note templates be translated by having different note types for each language (it's definitely supported by BrainBrew), but it'd make the "recipe" files more complicated. We'd ideally also have to think about not duplicating the template HTML — i.e. the words "Capital", "Country", "Hint:" etc. should be translated, but the HTML "structure" should be generated from a single source. |
Riiight, I get it now, thanks for clarifying. |
I found a way to make Full Language version.
Now a upload a demo for template use this JavaScript trick in our style.css.
Can we do this?
src\note_models
reference with multi-language_support.diff in multi-language_support_files.zipWe can get Anki users' device local language with
Then we can add all language versions to each card. Select the corresponding language to display through JavaScript.
Use ###Text### as markup for regular replacement
Maybe this time we can integrate the full language version?
Finally, I would like to ask if our language code will become complete, such as en-us, zh-cn?
I have used this automatic translation method in the floating button of my ClozeAdv template. Everyone can test it.
Or we can use this method to make the template full language first?
I think we can make a big deal
The text was updated successfully, but these errors were encountered: