PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Changing the default language in the forms.

  1. Hi,

    I have an installation of WordPress in English, but I want to use the Gravity Forms Plugin in Brazilian Portuguese. How can I do that? It's appearing in english by default.

    Tks

    Posted 12 years ago on Wednesday February 15, 2012 | Permalink
  2. Hi, LedStyle,

    By default, Gravity Forms will use the language of your site. You can change the language for just a plugin by using one of WordPress' hooks. You can use the "plugin_locale" filter like the example below. This will tell Gravity Forms to use the language file for Brazilian Portuguese, while other plugins continue to use the site's language. This will impact both the front-end forms and the admin. You would put the code in your theme's functions.php file.

    add_filter("plugin_locale", "change_language", 11, 2);
    function change_language($locale, $domain)
    {
           //only change language for gravity forms
    	if ($domain != "gravityforms")
    	{
    		return $locale;
    	}
    	else
    	{
    		return "pt_BR";
    	}
    }

    Let me know if you have questions. Boa sorte!

    Posted 12 years ago on Friday February 17, 2012 | Permalink

This topic has been resolved and has been closed to new replies.