I searched around and did not see any method of loading a language pack on the fly. Or without editing the minecraft.jar directly.
I also found MCPatcher Beta and wanted to test making a mod with it.
So I present you with Minecraft Translator.
How to install:
Download the mod and extract it to your /.minecraft folder.
Download the MCPatcher Beta.
Run MCPatcher, make sure that 'Minecraft Translation Support' is enabled checked/enabled. If it does not appear on the list, make sure MinecraftTranslation.jar is located in your /.minecraft/mcpatcher-mods/ folder.
By default, when you first load Minecraft with the mod applied it will attempt to load the language for your current locale, if it cannot find a pack for it, it will switch to the default (The one inside minecraft.jar).
I've included a sample pack for Norwegian with the information from here.
Change Log:
[*:a57qv3db]v1.1
[*:a57qv3db]Fixed the In-game menu language.*
[*:a57qv3db]Fixed the world loading language.*
[*:a57qv3db]Fixed the death menu.*
[*:a57qv3db]v1.0 Initial release
*See the added properties below
Creating a pack:
To make a language pack, create a zip file with the following:
supported.txt:
[*:a57qv3db]Supported.txt:
A list of the supported locales for your pack, in ISO639-1_ISO3166-2 format, 1 language & region per line.
[*:a57qv3db]Splashes.txt:
A text file that will be used to show messages on the main screen. You know, that big floating yellow text under the minecraft logo.
[*:a57qv3db]*.lang:
All *.lang files in your zip will be added to the list used when MineCraft tries to get a piece of text. You can use this to split up and organize your translation.
[*:a57qv3db]font.txt/font.png:
This is the actual characters that will be displayed on screen, I am not sure how well font.png works with the high resolution texture packs, I still need to work on that.
Also, Somewhere, in one of your .lang files, you need to add the translation for options.language, this is what will be displayed in the options panel when they select your language.
New Properties:
These are non-standard properties in the .lang files, but are needed if you make a translation for this mod.
#Option Menu: The title of your language
options.language=Language: English
#In-game Menu
menu.save.quit=Save and quit to title
menu.disconnect=Disconnect
menu.return=Back to game
gui.savetext=Saving level..
gui.gamemenu.title=Game menu
#Level Loading Progress Text
gui.level.gen=Generating level
gui.level.load=Loading level
gui.level.convert=Converting World to
gui.level.convert2=This may take a while :smile.gif:
gui.level.building=Building terrain
gui.level.simulate=Simulating world for a bit
#Nether Text
gui.nether.enter=Entering the Nether
gui.nether.leave=Leaving the Nether
#Death Screen
gui.gameover=Game Over!
menu.respawn=Respawn
menu.quit=Title menu
gui.score=Score: &e
Note: When you switch languages, the current window will not update, you must backout/return to see the new language on anything other then the Language button. This is because of how Minecraft works, live with it :tongue.gif:
Anyways heres a screen shot:
Anyways, suggestions/comments? This was mainly a test of the new MCPatcher. And a bit of learning java bytecode.
Later tonight i'll release another version which doesnt automatically use the default language pack, to help people who are writing packs know what goes where.
As for other things that are still in english, like the world loading progress bars/updating/etc..
Those are hardcoded strings, I am looking into a elegant way to wrap those without screwing up the client, and without destroying the const pool {used by other mods if they us MCPatcher to find files}
I just put this out to gauge the reaction/interest in it. Its better then having to manually edit the jar whenever you want to change languages.
Can you post specific screen shots of where English is still present? It'll help me track down what parts I need to look into.
[*:16ki19mr]Fixed the In-game menu language.*
[*:16ki19mr]Fixed the world loading language.*
[*:16ki19mr]Fixed the death menu.*
*See the added properties below
New Properties:
These are non-standard properties in the .lang files, but are needed if you make a translation for this mod.
#Option Menu: The title of your language
options.language=Language: English
#In-game Menu
menu.save.quit=Save and quit to title
menu.disconnect=Disconnect
menu.return=Back to game
gui.savetext=Saving level..
gui.gamemenu.title=Game menu
#Level Loading Progress Text
gui.level.gen=Generating level
gui.level.load=Loading level
gui.level.convert=Converting World to
gui.level.convert2=This may take a while :smile.gif:
gui.level.building=Building terrain
gui.level.simulate=Simulating world for a bit
#Nether Text
gui.nether.enter=Entering the Nether
gui.nether.leave=Leaving the Nether
#Death Screen
gui.gameover=Game Over!
menu.respawn=Respawn
menu.quit=Title menu
gui.score=Score: &e
PS: Maybe i'm going to say a ******** ...but, if i want to translate a MOD? I can do it??
Ie, if i add some string to the base.txt file with the mod's added thing it will work??
I could write it into the patcher to search for mod text, but that would be a big pain.
What the mod makers need to do is start using the locale provider inside minecraft to get there strings:
text = "My text";
to:
text = LocaleProvider.getInstance().getString("mod.mymod.mystring", "My Text");
As my mod replaces the LocaleProvider class, it'll work fine. {Note, MCP need to be updated and add names to the LocaleProvider class/functions}
Ya, its a modder's choice, if this becomes popular, I hope that they adopt it as a standard like they should.
Also, this works with 1.4_01 with no modifications <3
[*:10vncb5v]Fixed font image, and font.txt loading.
[*:10vncb5v]Fixed compatibility with HD textures and custom font.pngs
Note: Font.txt is in UTF8, which DOES support unicode characters. So making a Japanese/Korean/etc.. language pack IS possible.
If this mod is combined with the HDFont mod, larger font.png's will work, allowing for more detailed characters {needed for fancy unicode}.
Would someone please make me a japanese language pack so I can test it out please.
I also found MCPatcher Beta and wanted to test making a mod with it.
So I present you with Minecraft Translator.
How to install:
Download the mod and extract it to your /.minecraft folder.
Download the MCPatcher Beta.
Run MCPatcher, make sure that 'Minecraft Translation Support' is enabled checked/enabled. If it does not appear on the list, make sure MinecraftTranslation.jar is located in your /.minecraft/mcpatcher-mods/ folder.
By default, when you first load Minecraft with the mod applied it will attempt to load the language for your current locale, if it cannot find a pack for it, it will switch to the default (The one inside minecraft.jar).
I've included a sample pack for Norwegian with the information from here.
Change Log:
[*:a57qv3db]v1.1
*See the added properties below[*:a57qv3db]Fixed the In-game menu language.*
[*:a57qv3db]v1.0 Initial release[*:a57qv3db]Fixed the world loading language.*
[*:a57qv3db]Fixed the death menu.*
Creating a pack:
To make a language pack, create a zip file with the following:
supported.txt:
[*:a57qv3db]Supported.txt:
Also, Somewhere, in one of your .lang files, you need to add the translation for options.language, this is what will be displayed in the options panel when they select your language.A list of the supported locales for your pack, in ISO639-1_ISO3166-2 format, 1 language & region per line.
[*:a57qv3db]Splashes.txt:
A text file that will be used to show messages on the main screen. You know, that big floating yellow text under the minecraft logo.
[*:a57qv3db]*.lang:
All *.lang files in your zip will be added to the list used when MineCraft tries to get a piece of text. You can use this to split up and organize your translation.
[*:a57qv3db]font.txt/font.png:
This is the actual characters that will be displayed on screen, I am not sure how well font.png works with the high resolution texture packs, I still need to work on that.
New Properties:
These are non-standard properties in the .lang files, but are needed if you make a translation for this mod.
Note: When you switch languages, the current window will not update, you must backout/return to see the new language on anything other then the Language button. This is because of how Minecraft works, live with it :tongue.gif:
Anyways heres a screen shot:
Anyways, suggestions/comments? This was mainly a test of the new MCPatcher. And a bit of learning java bytecode.
EDIT: I'm done but for some reason it does not work, ill leave the link here, maybe OP can Check it out n' see what's wrong with it: Click ME!
As for other things that are still in english, like the world loading progress bars/updating/etc..
Those are hardcoded strings, I am looking into a elegant way to wrap those without screwing up the client, and without destroying the const pool {used by other mods if they us MCPatcher to find files}
I just put this out to gauge the reaction/interest in it. Its better then having to manually edit the jar whenever you want to change languages.
Can you post specific screen shots of where English is still present? It'll help me track down what parts I need to look into.
Screenie
=)
Download: http://filebeam.com/55716d9bd5f9f615b515c43301a96107
Changes:
[*:16ki19mr]Fixed the In-game menu language.*
*See the added properties below[*:16ki19mr]Fixed the world loading language.*
[*:16ki19mr]Fixed the death menu.*
New Properties:
These are non-standard properties in the .lang files, but are needed if you make a translation for this mod.
I could write it into the patcher to search for mod text, but that would be a big pain.
What the mod makers need to do is start using the locale provider inside minecraft to get there strings:
text = "My text";
to:
text = LocaleProvider.getInstance().getString("mod.mymod.mystring", "My Text");
As my mod replaces the LocaleProvider class, it'll work fine. {Note, MCP need to be updated and add names to the LocaleProvider class/functions}
Also, this works with 1.4_01 with no modifications <3
Update: v1.2
Download: http://filebeam.com/0637d798ec28daae88d5c28e02737de5
Changes:
[*:10vncb5v]Fixed font image, and font.txt loading.
[*:10vncb5v]Fixed compatibility with HD textures and custom font.pngs
Note: Font.txt is in UTF8, which DOES support unicode characters. So making a Japanese/Korean/etc.. language pack IS possible.
If this mod is combined with the HDFont mod, larger font.png's will work, allowing for more detailed characters {needed for fancy unicode}.
Would someone please make me a japanese language pack so I can test it out please.
Please upload the mod again, the links are not working.