Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

multilingual form messages


Reply


2 Posts   1388 Views

Avatar
yurigoul

Community Member, 202 Posts

4 February 2010 at 2:27am

Hi,

I have a multilingual site (NL, DE, US) where NL is set as the default language, i18n.js is loaded but the contact form only uses sapphire/javascript/lang/en_US.js for the error messages, no matter what language I am in. The result is that all the messages on the form appear in US-English only ('Please fill out "Name*", it is required.' etc).

I have done my dev/builds and whatever and I put everything I could find regarding translatable, default languages, i18n in mysite/_config.php and everything else is working just fine (my http-equiv="Content-Language" says content="de-DE",
got a language menu that works and even got the google sitemap extension working for sitemap.xml in different languages - and used a sitemap-index.xml for my robots.txt with links to them all)

Anyone?

Avatar
yurigoul

Community Member, 202 Posts

4 February 2010 at 2:38am

GOT IT! Forgot to add:

public function init() {
      parent::init();

      if($this->dataRecord->hasExtension('Translatable')) {
         i18n::set_locale($this->dataRecord->Locale);
      }
}