• Resolved jerrystewart99

    (@jerrystewart99)


    Hi,
    Love the plugin. Just exactly what I need 🙂

    I’d like use NZ Maori which is not in the WordPress list.. The Locale is mi_NZ

    Can you tell me the steps to accomplish this please?

    I tried a editing a copy of en_NZ.po, saving to mi_NZ.po and using Poedit to create mi_NZ.mo.

    That seemed to work. I copied the new files file into /wp-content/languages.
    In Settings-General|Site Language I can see the language under Installed (but not under Available)

    On Falang|Languages|Add New Language, mi_NZ is not in the list of languages to choose from. I cannot seem to add this language to Falang.

    Note that my .po file does not need to contain any meaningful translations as I will use Falang to translate each page manually.
    I don’t want any auto-translate functions.
    I want to have a bi-lingual site and want to use the default en_NZ for WordPress admin.

    I’m competent with php, so if custom code is required, could you point me in the right direction?

    Thank you
    – Jerry

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jerrystewart99

    (@jerrystewart99)

    Hi again,

    As usual, I was overthinking it..

    I believe I have the answer.. at least it’s working for me. Perhaps this might help someone else

    I’ve uploaded a flag to ‘media’ and added the following code to a child theme functions.php file:

    add_filter( 'falang_predefined_languages', function( $languages ) {
    
      if ( !array_key_exists( 'mi_NZ', $languages ) ) {
    	
        $languages[ 'mi_NZ' ] = 
          array ( 'code' => 'mi',
                  'locale' => 'mi_NZ',
                  'name' => 'Māori',
                  'dir' => 'ltr',
                  'flag' => 'mi',
                  'facebook' => 'en_US' );
    
        return $languages;
      }
    } );
    Plugin Author sbouey

    (@sbouey)

    Hi,

    you put the question and the response , i put the thread as resolved.

    Stéphane

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom language’ is closed to new replies.