Jump to content

Multi Language


Patrix
 Share

Recommended Posts

Introduction

Languages.vdf is a collection of default Gothic 2 NoTR .TEX & .FNT for different language types.
The archive currently supports the following languages:

  • English - EN

  • Polish - PL

  • Russian - RU

  • German – DE

Default font names for Gothic 2 NoTR are:

  • Font_10_Book.tga

  • Font_10_Book_Hi.tga

  • Font_20_Book.tga

  • Font_20_Book_Hi.tga

  • Font_Default.tga

  • Font_Old_10_White.tga

  • Font_Old_10_White_Hi.tga

  • Font_Old_20_White.tga

  • Font_Old_20_White_Hi.tga


The naming pattern for different language fonts is:
[LANG_PREFIX]_FONT_TGA_NAME, e.g: RU_FONT_OLD_10_WHITE_HI.TGA

All of the languages that listed here are also supported by the g2o modifcation.

Project links:
- Download

G2O Language Support

Gothic 2 Online Scripting API allows to interact with user input by specifying the keyboard layout.
The list of the keyboard layout can be found here. By default, the inital layout is set to english.

Here’s the complete list of scripting functions that are used to work with user input:


It’s also possible to add support for other languages by overloading existing functions and adding a new keyboard support for specific language(s) in squirrel.

Overloading squirrel functions example

local currentLayout = 0
getKeyLayout = function()
{
	return currentLayout
}

local _setKeyLayout = setKeyLayout
setKeyLayout = function(layout)
{
	if (layout < 0 || layout > 4)
		return

	currentLayout = layout
	_setKeyLayout(layout)
}

local _getKeyLetter = getKeyLetter
getKeyLetter = function(key)
{
	if (currentLayout < 4)
		return _getKeyLetter(key)

  // your implementation of key mappings for other langs
  // this example adds another language in id 4,
  // but you can always modify it and add more than one additional lang.
  // Anyway, this is everything that you must do for G2O, to support more keyboard layouts.
}

 

  • Like 3
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...