Home Forums Support How to add new currency

This topic contains 11 replies, has 2 voices, and was last updated by  Hillel Coren 2 months, 3 weeks ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #21081

    manalina
    Participant

    Hello everyone!

    Working on Self-hosting v4.5.13

    i’m new around here. I just donwloaded and installed the latest self-hosting ninja and I just saw that the currency I need is not listed in there. So how/where do I add it?

    Thanks for any answer.

    #21084

    Hillel Coren
    Keymaster

    You can add it here and then load /update, you’d also need to add the text localization strings.

    https://github.com/invoiceninja/invoiceninja/blob/master/database/seeds/CurrenciesSeeder.php#L12

    If you provide the details we’re also happy to add it to the app.

    #21085

    manalina
    Participant

    I’ll do that then come back here with the details! Thanks for the answer.

    #21206

    manalina
    Participant

    Hi Hillel! I added the new currency in the CurrencysSeeder. I looked at the currency info here: http://www.localeplanet.com/icu/currency.html. It’s the Malagasy Ariary, code and Symbol = MGA.

    But where do I add the text localization strings. Is it in resources/lang?

    #21210

    Hillel Coren
    Keymaster
    #21212

    manalina
    Participant

    That’s what I’ve done but nothing appears in the dropdown. Gonna check if i haven’t mispelled something.

    #21231

    manalina
    Participant

    Ok, now I’m a bit lost. I’ve added the currency in the seeder

    ['name' => 'Gibraltar Pound', 'code' => '', 'symbol' => 'GIP', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'],
    ['name' => 'Malagasy Ariary', 'code' => 'MGA', 'symbol' => 'Ariary', 'precision' => '0', 'thousand_separator' => '.', 'decimal_separator' => ','],

    and the text localization string

    'currency_gibraltar_pound' => 'Gibraltar Pound',
    'currency_malagasy_ariary' => 'Malagasy Ariary',

    but still nothing appears. What have I done wrong?

    #21313

    Hillel Coren
    Keymaster

    Have you added the strings in the language file you’re using in the app?

    #21319

    manalina
    Participant

    Yes! Using the french version and added it to the texts.php file in fr as well as the en folder but still nothing. Any hint?

    • This reply was modified 3 months ago by  manalina.
    #21322

    Hillel Coren
    Keymaster

    Sorry, not sure…

    #21422

    manalina
    Participant

    Hello!

    Since my install was vanilla I decided to:

    1. erase everything (from ftp to database)
    2. added the new currency in seeds currencies and in sql setup file
    3. updated both en and fr text language strings
    4. uploaded everything
    5. relaunched a brand new installation

    And taddaaa!!! I got my app up and running with my new currency!

    Thanks for the time you used to help me out. Keep up the great work 🙂

    #21423

    Hillel Coren
    Keymaster

    Glad to hear it, thanks for the update!

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

Posted in: