Difference between revisions of "Locale"

From mcMMO wiki
Jump to: navigation, search
Line 7: Line 7:
 
  https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/resources/locale/locale_en_US.properties
 
  https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/resources/locale/locale_en_US.properties
  
Copy this file and replace any strings you want to change:
+
Make a new file with the same name as this one, and copy only the strings you want to replace, otherwise you will not see any updated strings as they are changed as your copy of the file will have priority.
You do NOT have to replace the whole locale, only those you want changed.
+
If you wish to replace every line in some way, feel free to copy the entire contents of this file, just be advised that you will need to be on top of locale updates in mcMMO.
  
 
Locales only support ASCII and UTF16 characters at the moment, so you'll need to run special characters through a UTF16 converter (google it) to get them to work. This will be fixed in the future!
 
Locales only support ASCII and UTF16 characters at the moment, so you'll need to run special characters through a UTF16 converter (google it) to get them to work. This will be fixed in the future!

Revision as of 07:33, 4 May 2019

Locales are the language files used by mcMMO, they also contain color codes and most of the styling used by mcMMO. You can customize a locale outside of the JAR in version 2.1.51 and up.

Locales can be overriden by placing a file with an appropriate name inside /plugins/mcMMO/locales/

You can find the up to date current en_US locale entries at

https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/resources/locale/locale_en_US.properties

Make a new file with the same name as this one, and copy only the strings you want to replace, otherwise you will not see any updated strings as they are changed as your copy of the file will have priority. If you wish to replace every line in some way, feel free to copy the entire contents of this file, just be advised that you will need to be on top of locale updates in mcMMO.

Locales only support ASCII and UTF16 characters at the moment, so you'll need to run special characters through a UTF16 converter (google it) to get them to work. This will be fixed in the future!

The locale name must match the internal file you are overriding (ie: locale_en_US.properties) The locale file names are structured like this 'locale_XX_XX.properties', replace XX with your country codes, if you are not overriding en_US you will have to change the targetted locale inside config.yml

Locale will first check for a users locale file, if it doesn't exist it will use the files inside the JAR.

If a locale is found, it will use locale entries from that file, and if any entries are missing, it will use entries from en_US inside the JAR


Use the locale reload command /mcmmolocalereload to reload your locale.