slapz0r

Language layout

Recommended Posts

Posted (edited)

How do i get player current language layout?

For example, a player has an English layout: A message will appear in the chat - English layout

If the player switches to another language layout, A message will appear in the chat - other layout

 

Edited by slapz0r

Share this post


Link to post
16 minutes ago, slapz0r said:

How do i get player current language layout?

For example, a player has an English layout: A message will appear in the chat - English layout

If the player switches to another language layout, A message will appear in the chat - other layout

 

Check that.

https://wiki.multitheftauto.com/wiki/GetLocalization

Share this post


Link to post

 

local messages = {
	en = {
		["welcome"] = "Hi"
	},
	nl = {
		["welcome"] = "hoi"
	}
}

function getMessageTextById(id, language)
	return messages[language] and messages[language][id] or messages["eng"][id] or ""
end

 

How about you create a  global language system?

@slapz0r

 

iprint(getMessageTextById("welcome", "nl"))

 

 

Share this post


Link to post
7 minutes ago, IIYAMA said:

 


local messages = {
	en = {
		["welcome"] = "Hi"
	},
	nl = {
		["welcome"] = "hoi"
	}
}

function getMessageTextById(id, language)
	return messages[language] and messages[language][id] or messages["eng"][id] or ""
end

 

How about you create a  global language system?

@slapz0r

 


iprint(getMessageTextById("welcome", "nl"))

 

 

I just need to check the current language of the player in his windows(Language bar in windows)

For example, initially the user has English - a message will appear - English

As soon as you switch to another language, another message will appear

Share this post


Link to post
3 hours ago, slapz0r said:

I just need to check the current language of the player in his windows(Language bar in windows)

For example, initially the user has English - a message will appear - English

As soon as you switch to another language, another message will appear

That is more or less a privacy breach.

Share this post


Link to post
36 minutes ago, IIYAMA said:

That is more or less a privacy breach.

I just tried to make for login panel, for input fields,label which would determine which language is selected in the Windows language bar

Share this post


Link to post
8 minutes ago, slapz0r said:

I just tried to make for login panel, for input fields,label which would determine which language is selected in the Windows language bar

Yes, I can understand that. But it is not ethical for MTA to implement such a privacy sensitive feature, so I doubt they will add something like that.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.