Language Packs for Better than Wolves

This sub-forum is dedicated to add-ons and texture packs for Better Than Wolves.
Post Reply
User avatar
Yhetti
Posts: 427
Joined: Sat Feb 09, 2013 7:57 pm

Language Packs for Better than Wolves

Post by Yhetti »

A while ago I had a thought...Minecraft supports a lot of languages, but Better than Wolves only has English available. I know for a fact it's not hard to programatically assign a name to an Item or a Block in the game to a language, these names could be listed in simple file that maps unlocalized names to localized names using my API for the Deco addon. So I could add a simple Deco Addon Module for loading said language files. The problem is, I don't know a lot of languages.

So I guess what I'm here to do is to see if there's any community interest in building some different language packs in Better than Wolves. I don't know if there's a way to append to Minecraft's language packs, but if there's not, it would not be hard for me to make a 'language pack loader mod' - for the Deco Addon. (I could do this, in say, a weekend where people leave me alone).
User avatar
DiamondArms
Posts: 486
Joined: Sun Apr 21, 2013 9:04 am

Re: Language Packs for Better than Wolves

Post by DiamondArms »

So apparently there are ways to edit/add language packs to minecraft, not sure how applicable this would be to BTW though.

video tutorial on editing lang files. involves funny .jar copying

I'd be interested in trying to translate BTW for japanese. been meaning to learn kanji for a while and this might be a good opportunity.
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Language Packs for Better than Wolves

Post by FlowerChild »

The problem you'd likely encounter with this is that I never coded BTW for ease of localization / translation. It's got strings scattered throughout the code as a result, and given it was a hobby project, I never felt inclined to change that.
User avatar
Yhetti
Posts: 427
Joined: Sat Feb 09, 2013 7:57 pm

Re: Language Packs for Better than Wolves

Post by Yhetti »

FlowerChild wrote:The problem you'd likely encounter with this is that I never coded BTW for ease of localization / translation. It's got strings scattered throughout the code as a result, and given it was a hobby project, I never felt inclined to change that.

Last time I checked each langauge is just a hashmap of unlocalized -> localized names. I could be wrong though. When i want to add or replace a name for one of my mods I call one method which is set to add to the english map.
User avatar
Gilberreke
Posts: 4486
Joined: Thu Jul 14, 2011 3:12 pm
Location: Belgium

Re: Language Packs for Better than Wolves

Post by Gilberreke »

Yhetti wrote:Last time I checked each langauge is just a hashmap of unlocalized -> localized names. I could be wrong though. When i want to add or replace a name for one of my mods I call one method which is set to add to the english map.
This is only true if FlowerChild strictly followed localization procedures, storing every string he used in the hashmap. He indicates above that he didn't (understandably), so that wouldn't work.

If he had, we wouldn't need a mod either, I think you could just make a resource pack that contains the language.

There might be a way to write code that changes all the strings and loads them from a hashmap, but we'd need a list of all strings in BTW and check which ones can be edited by a mod. Off the top of my head, I think you can edit block and item names easily, you might be able to change GUI names, you probably won't be able to change chat messages or UI messages and you can probably change the title screen messages.

The messages we probably can't change are things like:
- The chat error message when placing a windmill incorrectly
- The chat error message that you can't sleep
- The text indicating you are in gloom/terror
Come join us at Vioki's Discord! discord.gg/fhMK5kx
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Language Packs for Better than Wolves

Post by FlowerChild »

Gilberreke wrote: This is only true if FlowerChild strictly followed localization procedures, storing every string he used in the hashmap. He indicates above that he didn't (understandably), so that wouldn't work.
Yup, that's exactly right. BTW was never architected from the ground up. It started as a 6 block solitary hobby project that organically grew from there. Commercial / team coding practices were thus never a priority, and if I needed a string, I just slapped it right in the code where I was using it ala:

print( "Hello world!" );

I could be wrong, but I'm not even sure language packs existed when i started modding MC. I remember some point in the lifecycle of the mod where everyone was going translation crazy because I think they had just been added to vanilla, and I responded with "fuck that" for the same reasons I mention above:

The mod was not coded to accommodate translations.
User avatar
Gilberreke
Posts: 4486
Joined: Thu Jul 14, 2011 3:12 pm
Location: Belgium

Re: Language Packs for Better than Wolves

Post by Gilberreke »

The whole translation thing is a bit weird to me, personally, too. Starting as a kid, I've never played a translated version of a game or watched a dubbed movie or series. I see a lot of people that clearly know enough English, but prefer translations.

Not a judgment or even an opinion, just an observation that translations seem alien to me. Then again, I come from a country that has three official languages and no dub studios, so it's probably a cultural thing. 90% of our entertainment here is subtitled or just original language.
Come join us at Vioki's Discord! discord.gg/fhMK5kx
User avatar
Yhetti
Posts: 427
Joined: Sat Feb 09, 2013 7:57 pm

Re: Language Packs for Better than Wolves

Post by Yhetti »

Okay. You guys are mostly right. I've just looked at the code.

One thing that can be done though...(and this was the original idea a friend and I had while we were playing and beer drinking)
We can override block/item names of the current language that is loaded. In other words, you could create a name hash-map file that is loaded by an add-on so that users could have their own custom names for each block/item in the game. I am not sure if this can be done with a texture-pack or not, but it can be done programatically I have done this programattically before, without editing previously existing code. This would allow users to do both silly things like, changing "Dung" to "Shit" and changing "Hemp" to "Northern Lights", but also practical things like creating translations for items. Of course these translations would not be available in the "Languages" section in the settings, they would have to be in the form of a file that users would drop into their game directory, and is loaded automatically by the addon. This file would map the "unlocalized name" of an item/block to whatever custom name the user wants.

I don't know if that makes any sense, I hope I'm not just rambling
Last edited by Yhetti on Sun Aug 06, 2017 8:44 pm, edited 1 time in total.
User avatar
Yhetti
Posts: 427
Joined: Sat Feb 09, 2013 7:57 pm

Re: Language Packs for Better than Wolves

Post by Yhetti »

Gilberreke wrote: The messages we probably can't change are things like:
- The chat error message when placing a windmill incorrectly
- The chat error message that you can't sleep
- The text indicating you are in gloom/terror
I agree, those are a lost cause, I don't know where to start with those. I am mostly just talking about blocks and items, but I think I might discover some other things that fall into this category.
Post Reply