Jump to content

Localizing in 1.6.4?


ezres

Recommended Posts

Hey, I've made my first mod, and I'd like to ask a question.

 

I've read in a page, that loading from en_US.lang which is in the assets/modname/lang folder, is done by using I18N.getString("name.of.text"), which should produce "test", if the lang file contains "name.of.text=test". However, it's not working for me. I'm trying to display this text in a GUI, by adding a centered string to it, but nothing appears. Do I have to register my lang files anywhere in an initialization event? I'm already loading a block's name from it and it's working like a charm, but not with GUI elements.

 

Here's how I try it in the initGui method:

this.buttonList.add(this.done = new GuiButton(0,this.width/2 - 110, this.height/4+30,90,20,I18N.getString("testgui.okbutton")));

 

And I have 2 lang files, an english and a hungarian. Both of them contains "testgui.okbutton=OK", but neither of them loads - yes, I tried to change language ingame to see if that's the problem, but still no luck.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.