Question

The parsley.js code for localization is

<script type="text/javascript" src="/i18n/messages.fr.js"></script>
<script type="text/javascript" src="parsley.js"></script>

But I need to change the language after initialization with javascript. The messages.fr.js extends the parsley config window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, {messages: ... }. And I haven't found a way to overwrite it afterwards.

Était-ce utile?

La solution

Unfortunately, that is not something possible easily on Parsley 1.x.

But thankfully, Parsley 2.0.0-rc1 reworked entirely the way it handles localization and allow to do so.

Best

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top