Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi language support (Localisation) #40

Open
SaltPepp opened this issue Sep 16, 2015 · 10 comments
Open

Multi language support (Localisation) #40

SaltPepp opened this issue Sep 16, 2015 · 10 comments
Assignees

Comments

@SaltPepp
Copy link
Collaborator

In the future, we will need to read server messages from a language config file. That way people can translate the messages eg error messages to their language that they read and write.

@midspace
Copy link
Collaborator

There isn't localization support for Mods currently, only of resources within Space Engineers.
We can access those currently.
The other issue is, where to deal with localization, as we will be carrying out a fair amount of processing on the Server, and that either means forming the message string on the server in the player's selected localization to send back, or sending back the message context, and building the message string on the player's clients in their localization.

Issue #5, in the Seen update we will have to pass the last Localization used by a Player to the Server also, so any offline messages are formed correctly.

midspace added a commit that referenced this issue Sep 19, 2015
Added OpenedDate and Language properties to the Bank Account.
They are updated correctly by the Seen event.
@jpcsupplies jpcsupplies changed the title Multi language support Multi language support (Localisation) Oct 2, 2015
@jpcsupplies
Copy link
Owner

I think we can not worry about this too much, the only localisation we realistically need is on the manual page, although our mod is basically english; the commands are basic enough that if someone pushes the current manual through google translate they should have no trouble. I think the mod is searching on item names as reported to it by the game anyway, which itself will be automatically localising them anyway, The only way we could conceivable improve on that is creating a bunch of alternate buy/sell commands in a variety of languages and keyboard maps and adding them to our command list. Potentially we could create a xml file that allows admins to localise it themself..

eg.. command to listen for, command to processes when that command used

eg.

french
acheter
vendre
prix
valeur

when a french player types /prix the plugin checks the alias list, sees it relates to "/price" command and executes that code.

realistically this creates an entire bucket of annoying issues such as rewriting our command catch engine to compare to a list and execute the correct routine, which for the time/benefit ratio is not really worth it.

The new logic would need to be something like a regex that checks each command starts with / then looks up the first string in an xml list, and then passes all the parameters typed in via the regix to a routine for that function. It would require a time consuming rewrite of the entire plugin for only minor benefit.

@midspace midspace self-assigned this Dec 13, 2015
@midspace
Copy link
Collaborator

I'm re-opening this, mostly for my own self gratification, but also because I think we get get more people using this mod if we can at least cater to their language.
I say this because I've just discovered that the Server code does not offer any localization whatsoever.
The game when it starts - both Client and Server - explicitly sets the CultureInfo to Invariant. That means, that it isn't even using OS defaults. It's really raw formats.
We're just lucky that the formatting is at least somewhat similar to those used in English speaking countries that we can understand it.

@midspace midspace reopened this Dec 13, 2015
midspace added a commit that referenced this issue Dec 13, 2015
Added new Config setting to allow the Server to specify the language.
This affects:
The name of components on LCD.
The format of numbers and dates on LCD.
The name of components when messages are sent back to Clients.

Currently not affected:
The formats of values and dates getting sent back to Clients.

This does not affect:
The identification of components on the Client.
@midspace
Copy link
Collaborator

By setting the Language in the Config, the Server language can be applied.
Notice that Client language is NOT affected, but LCD's that are composed by the Server are.

<EconConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Language>4</Language>

2015-12-13_00001

@jpcsupplies
Copy link
Owner

Ah, nice. So how would the end user/admin make use of this (or rather how do i describe it in the manual!)

midspace added a commit that referenced this issue Dec 13, 2015
Fixed the LCD wide detection, as it isn't compatible with non-English
localization.
@midspace
Copy link
Collaborator

We will have to add a command to change Configuration values at some stage.

Currently:
The Space Engineers Dedicated Server by default do not have a language.
By setting the Language in the Economy Config, a language can be applied to a Dedicated Server.
Note that Client language is NOT affected by this, but LCD's that are composed by the Server are.

Modify your Economy Config file to add the <Language> element if it doesn't already have one as per below.

<EconConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Language>4</Language>

The following values are the only values accepted by the game.

English = 0,
Czech = 1,
Slovak = 2,
German = 3,
Russian = 4,
Spanish_Spain = 5,
French = 6,
Italian = 7,
Danish = 8,
Dutch = 9,
Icelandic = 10,
Polish = 11,
Finnish = 12,
Hungarian = 13,
Portuguese_Brazil = 14,
Estonian = 15,
Norwegian = 16,
Spanish_HispanicAmerica = 17,
Swedish = 18,
Catalan = 19,
Croatian = 20,
Romanian = 21,
Ukrainian = 22,
Turkish = 23,
Latvian = 24

@jpcsupplies
Copy link
Owner

for configuring in game -
/set language X
or
/set lcd X ??

@jpcsupplies
Copy link
Owner

ive also added the localisation notes to steam guide

@midspace
Copy link
Collaborator

I've removed the Chinese. It used to be in the old SE code. It's no longer there in current SE code.

We need a general config command.
more like.

/econfig - Display current settings.
/econfig language 4 - change language to 4.
/econfig language en - change language to 0 (after some detection).
/econfig TradeNetworkName Federated Terran Empire - change the TradeNetworkName
/econfig LimitedRange off - change LimitedRange off.
/econfig TradeTimeout 00:00:01 - change TradeTimeout to 1 second.
/econfig DefaultStartingBalance 5000 - change DefaultStartingBalance to 5000.

This should probably be part of #88

@jpcsupplies
Copy link
Owner

so keep set for stock related stuff, and econfig for behavioural settings basically? That could work.

@jpcsupplies jpcsupplies added this to the Alpha release 4.0 milestone Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants