Need help with Turnip-Calculator?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

584 Stars 92 Forks MIT License 611 Commits 20 Opened issues


ACNH Turnip Calculator Responsive Web App

Services available


Need anything else?

Contributors list

ACNH Turnip Calculator

Calculate your turnip price patterns and gain the most from the stalk market!

You can find the live calculator here.


Looking for an API? See this

Local Development

To run this application locally, run the following commands:

git clone [email protected]:elxris/Turnip-Calculator.git
cd Turnip-Calculator
npm i
npm start


For translators

Please go to to start translating.

For developers

This app supports dynamic localization using i18next and react-i18next, with i18next-browser-languagedetector to automatically detect the user's native OS language preferences and switch the app's language accordingly.

Adding new text to localizations

As features are added to the calculator, they'll most likely not be localised immediately. To localise any new text in the app, make sure to first wrap the text in the

method taken from the
hook. Then, in your language's
, add a new JSON key/value pair with the key used in the
method, using your translated text as the value.

For example, let's say we're adding a new button that says "Show Current Pattern". In the component where that text would be displayed, you would instead write

t("Show Current Pattern")
, wrapping the statement in brackets
if it were part of JSX code.

Then, to add a translation to your language, you'd go to your languages

file, and add the following line (using Spanish as an example):

"Show Current Pattern": "Mostrar Patrón Actual",

If no key is specified in the localization files, the app will simply display whatever text is passed into

, to avoid errors.

Creating new localizations

To localise the app to a new language, the following simple steps need to be done:

  • Create a new folder under
    for your language using the standard two-letter IETF language code for your language (e.g.
    for Spanish,
    for Chinese). Keep in mind, the language code often differs from the more commonly known country code. For example, the country code for Korea is
    , but the language code for Korean is
    • Dialect codes are supported (e.g.
      for British English and
      for Brazilian Portuguese), but be sure to avoid hyphens (-) in variable names. As a reminder, hyphens can't be used in JavaScript variable names. When in doubt, stay consistent with existing code.
  • In the newly created folder, copy and paste the
    file from one of the other languages.
  • Edit the
    file to translate each untranslated JSON value to the appropriate translated equivalent in your language.
  • In
    , create an
    statement for your language, importing the
    file you just created. Follow the pattern used by the existing statements.
  • In the same file (
    ), add your language to the list of languages inside the
    object within the
    method, following the pattern of other declared languages, and using the same two-letter language code you used for the folder name in the first step.
  • Lastly, to add your language to the manual language switcher on the page, make sure to edit the
    component at
    . Add a tuple for your language to the
    array, with the first value being your two-letter language code and the second value being the name of your language, in your language.
    • For example, to add Japanese to the list, you'd add
      ["ja", "日本語"],

The localization is now ready to deploy and will appear to users who use your language for their browser.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.