Skip to content

Language

Daniel7400 edited this page Apr 15, 2025 · 9 revisions

As mentioned in the FAQ, this mod loads the text it displays directly from language resource files (see Question #5 in the FAQ for their location).

NOTE: Changing the language to one that uses a new font has the potential to crash the game sometimes. Once the font is actually loaded it should be fine to switch between. I've had it happen on the first switch or it never happening even after multiple switches.

The following languages have been translated by native speakers:

  • en-US (English - US)
  • de-DE (German)
  • fr-FR (French)
  • it-IT (Italian)
  • zh-CN (Chinese - Simplified)
  • es-ES (Spanish - Spain)
  • ko-KR (Korean)

The following languages were translated by native speakers but had text added later that has not been properly translated:

  • zh-HK / zh-TW (Chinese - Traditional)
  • ja-JP (Japanese)

For these languages above, these translations below are the ones NOT natively translated (in English for consistency):

"show_images": "Show Achievement Images",
"display_progress_as_percentage": "Display Progress as Percentage",
"center_align_text": "Center Align Tracker Text"
"tiny": "Tiny",
"base_game": "Base Game"
"completed": "- COMPLETED"

You can refer to the following commit for more info if needed: https://github.com/Daniel7400/MHWS-Achievement-Progress-Tracker/commit/563393ecd71c2d0bae3339023de748cc4eb62598#diff-d95b23ce1f5cbe5082437644539593f621a2a55f3b71bff8b3fccb3cb868312b

The rest of the included languages were machine translated by Google Translate, which you can find below:

  • el-GR (Greek)
  • es-MX (Spanish - Mexican)
  • pt-BR (Portuguese - Brazil)
  • ru-RU (Russian)
  • th-TH (Thai)
  • vi-VN (Vietnamese)

Modifying Language Files

Because of the way the language files are stored, and their format, they can be easily modified to change/customize.

  1. To modify an existing language file, first open that file in some form of text editor (such as Notepad++ or VS Code).
  2. Inside the file you will find a couple of important sections and values:
  • font: The font type to use for this language. Since different languages require different symbols/glyphs to display, you may need to use a specific font that has support for those to get it to show properly in game. (see more information in the Fonts resources section below)
  • unicode_glyph_ranges: A collection of hex strings that represent ranges of Unicode glyphs to allow when displaying text. Even with a proper font loaded, you may need to look up specific Unicode glyph ranges for the font to display those characters properly. (see more information in the Unicode Glyph Ranges resources section below)
  • associated_in_game_language_option: A number used to link the language file to the corresponding in-game language option that matches this value. (see more information in the In-Game Language Options resources section below)
  • ui: The section that contains all of the text that will be displayed in the REFramework UI mod menu. Changing any of these will result in changes to the text that is displayed in the REFramework UI mod menu.
  • tracker: The section that contains all of the text that will be displayed for the trackers themselves. Changing any of these will result in changes to the text that is displayed in the trackers.
  • modal: The section that contains all of the text that will be displayed for completion modal. Changing any of these will result in changes to the text that is displayed in the completion modal.
  • achievement: The section that contains all of the text that will be displayed for each specific achievement. Changing any of these will result in changes to the text that is displayed for that achievement.
  1. Make the changes you want to make to the file and save. Be careful not to change the actual structure of the file or the ordering, you should just be updated the text itself.

  2. Find a JSON validator online and copy the contents of your modified file and paste them into the validator. You need to verify the modifications still result in a valid JSON structure, otherwise the mod won't be able to read them.

  3. If you do NOT have the game running then just launch the game and wait for REFramework to initialize, then skip to step 7.

  4. Otherwise, if you DO have the game running already then open the REFramework UI (default is pressing "Insert") and expand the ScriptRunner section and press the Reset scripts button.

image

  1. Expand the Script Generated UI section in the REFramework UI, then expand the Achievement Progress Tracker section, then Settings, and finally Language. Once the dropdown is shown select the language file you modified.

image

  1. The language should change and the text should update accordingly. Verify your new/updated text shows as you expect.

image


Adding Language Files

This is the process for creating a brand new language file that will be usuable in-game by the mod.

  1. To create a new language file, I first recommend making a copy of the en-US.json file and naming the copy after the country code (see more about country codes in the resources section below) for the language you are trying to add. The file can technically be named anything, but to keep consistency I recommend using the country code style name.
  2. If you are unsure which font to use, I would leave it alone, otherwise set the font value to the name of the new font file and add the new font that are not already included here: /reframework/fonts (see more information in the Fonts resources section below)
  3. If you are unsure if your language requires any special Unicode glyph ranges, I would leave it alone for now, otherwise you can add the hex strings that represent the ranges for the Unicode glyphs (see more information in the Unicode glyph ranges resources section below).
  4. Go through and update the text for each language string to be that of the language you are trying to setup.
  5. From this point on you can refer to the prior section, Modifying Language Files, since at this point the process is largely the same.

Resources

Modifying or adding languages can be a bit daunting at first glance but hopefully these resources help you with any questions that you might have regarding the more complicated parts of the process.

Unicode Glyph Ranges

You can go here to see all of the Unicode glyph ranges available: https://symbl.cc/en/unicode-table

  1. From there you can either search using their included search bar if you know the range you are looking for, or if you aren't sure you can try to search online (Google, etc.) something like: (my language name) Unicode glyph ranges
  • From there it might require some searching through multiple pages, but someone somewhere should have something relating to it.
  1. Once you find the range, it should look something like this (ex. I want Cyrillic):

image

  1. You might not need all of them that show up, so it might be a bit of trial and error when adding them until everything loads in the mod.
  2. You would take a range image (in this case 0400 to 04FF) and write that as a hex code in the unicode_glyph_ranges section.
  3. This is done by taking those two values and adding a 0x (this is a zero, followed by an x). Which would be done like this:

image

  1. When adding these values, make sure each starts with the required 0x, is wrapped in double quotes, and is separated by commas. I recommend to keep the ones of the same range on the same line, but when adding more than a single range to have each range on it's own line.

  2. When you are done, make sure to validate the file is still valid by coping the contents of your file and paste them into some JSON validator online.

  3. Launch the game and verify your language file shows in the dropdown list, if not, you might have an issue with something in the file. If it does, select your language file and verify that the text should expect to show actually does show as expected. If not, you might be missing a range or might have entered the wrong one. It is also possible that the font you are using doesn't support the characters/glyphs you are trying to display so make sure you are using the correct font for your language.

In-Game Language Options

While each individual language file controls the text for all of the menus in the REFramework UI and the displayed achievements, with the addition of the missing section for certain achievements some text comes directly from the game. Because of this, you would need to set the associated_in_game_language_option field to match the language of the file you are creating (or whatever you want it to be). If the option you are using is returning English text that is because although the language option exists it doesn't actually have any text translated into that language, so instead of it being blank I display it as English. You can find the full list of in-game language options below:

{
	"Japanese": 0,
	"English": 1,
	"French": 2,
	"Italian": 3,
	"German": 4,
	"Spanish": 5,
	"Russian": 6,
	"Polish": 7,
	"Dutch": 8,
	"Portuguese": 9,
	"PortugueseBr": 10,
	"Korean": 11,
	"TransitionalChinese": 12,
	"SimplelifiedChinese": 13,
	"Finnish": 14,
	"Swedish": 15,
	"Danish": 16,
	"Norwegian": 17,
	"Czech": 18,
	"Hungarian": 19,
	"Slovak": 20,
	"Arabic": 21,
	"Turkish": 22,
	"Bulgarian": 23,
	"Greek": 24,
	"Romanian": 25,
	"Thai": 26,
	"Ukrainian": 27,
	"Vietnamese": 28,
	"Indonesian": 29,
	"Fiction": 30,
	"Hindi": 31,
	"LatinAmericanSpanish": 32
}

Fonts

Since different languages require different characters to show and font files can only contain so many glyphs inside them, you might need to find a specialized font for your language. A good place to find these fonts is here: https://fonts.google.com/noto

  1. From that page you can enter your language in the search bar or use the filters on the page to find a font that should work. The other fonts being used for this mod are also NotoSans variations.
  2. Download whatever font you want (it should be in a .zip file) and extract it.
  3. Read the included README.txt to find out more info on the included font files. But more than likely you can just go into the static folder that was extracted and use the NotoSans(something)-Bold.tff. Where the (something) will likely be 2 characters to designate what language the font is for.
  • Ex.) If you downloaded the Japanese font, you would want likely want to use the NotoSansJP-Bold.tff
  1. Copy/move the selected font file you want to use and place it in the fonts folder: ...MonsterHunterWilds/reframework/fonts

image

  1. Now you should be able to reference the font in your language file!

Country/Language Codes

This is more a preference thing, but it also helps keep the languages organized and lets you easily pick between them. To find a list of these country/language codes you can go here: https://simplelocalize.io/data/locales

Then when you are on the page, you can use the included search by to search by language name or country name and find the one you are looking for.

Clone this wiki locally