<div dir="ltr">With regards to internationalization I have two questions:<div><br></div><div>* Should we fallback to English messages if a key is missing in a translation? Alternative is to show key, but that&#39;s not going to help anyone</div><div>* Should we change message bundles to UTF-8? Or is <span style="color:rgb(53,56,51);font-family:Arial,Helvetica,sans-serif;font-size:12.16px">ISO 8859-1 going to work for all languages?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 October 2015 at 18:42, Stan Silvert <span dir="ltr">&lt;<a href="mailto:ssilvert@redhat.com" target="_blank">ssilvert@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Marko brought this to my attention yesterday.  For some things, we<br>
dynamically create UI.  In this case, the java code contains the English<br>
text and it needs to be localized.  Luckily, the solution was pretty<br>
straightforward.  We just replace the English text with a key into the<br>
message bundle.  The html template that displays this text already pulls<br>
from an Angular scope so we just leave that alone and pass it through<br>
the |translate filter.  You do need to also add the double-colon.<br>
<br>
One nice side effect is that if the key is not found in the bundle then<br>
the output of the translate filter is the unchanged text.  This means<br>
that any code which has not converted to using bundle keys will still<br>
work as expected.   And, any third-party providers can just pass in<br>
plain text if they don&#39;t care about l10n.  If they ever do care about<br>
l10n we will just need to provide a means for them to add key/value<br>
pairs to the resource bundles.<br>
<br>
Here is an example for anyone who needs to localize English text<br>
embedded in java:<br>
<a href="https://github.com/ssilvert/keycloak/commit/c9437595b70810c4472325373dd8833c37be8549" rel="noreferrer" target="_blank">https://github.com/ssilvert/keycloak/commit/c9437595b70810c4472325373dd8833c37be8549</a><br>
<br>
Stan<br>
_______________________________________________<br>
keycloak-dev mailing list<br>
<a href="mailto:keycloak-dev@lists.jboss.org">keycloak-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-dev</a><br>
</blockquote></div><br></div>