-
Notifications
You must be signed in to change notification settings - Fork 875
[WIP] docs(guide): document internationalization (i18n) #2309
Conversation
@@ -0,0 +1,19 @@ | |||
/// <reference path='../_protractor/e2e.d.ts' /> | |||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using it in all examples, I think it has to do with ts-node to be able to understand a few things.
Would be nice to add a short text about placeholders: <p i18n>this is <b>bold</b></p>
<p i18n>this is an {{ exp }}</p> |
@ocombe First, thanks for this doc. It could be interesting that you speak about the i18n-placeholder directive (and some others that I could not know). For information, I've implemented i18n in this app with the help of your doc (ng2-rc.7, angular-cli webpack.9-4): https://github.com/actimeo/simmage-ui It is not very clear how to choose the language at bootstrap time. I've made a first try with some quick hack to get the language from local storage. |
@feloy there will be a complete example added that should help you to know how to select the language at setup |
I've found the code here: In fact it is possible to mark any translatable attribute, e.g. i18n-placeholder to mark to translate the placeholder one. |
Interesting, thanks, I'm not sure if it is intended though, this might be something that could change later and you shouldn't rely on it |
Continuing in #2340 |
wahou what happens, too many francais here ;) |
Yep |
Hello !
Here is the dev guide for internationalization (i18n).
This is my first guide, which means that there are probably a lot of things to improve ! And since I'm french, there might be typos and weird sentences, don't hesitate to tell me what should be changed :-)
edit: @Foxandxss told me that I should add an application with a story, I'll be working on that