i have recently discovered a very nice nameplate addon (shNameplates) which has a really nice modifier for lang npc names. it shortens every word in the names to the first char and just displays the last word in the name in full length.
This is the code used for this:
local oldName = self.oldname:GetText()
local newName = (len(oldName) > 30) and gsub(oldName, "%s?(.[\128-\191]*)%S+%s", "%1. ") or oldName
This might work very well for the english clients but i would love to see this vise versa: output the first word in full length and shorten the following to the first char.
Can some one with good LUA knowledge please provide the code for this?
Thank you in advance!
In non English locales they have a possibly of using what's called a Multi-byte Character.
However, for my experiance i have only seen patters that detect if the first byte is a multi as in character names.
local MULTIBYTE_FIRST_CHAR = "^([\192-\255]?%a?[\128-\191]*)" -- taken from LibAlts-1.0
however you should be able to modify it by simply removing the ^ char at the beggining as that indicates the front of the string. Building off what Lombra gave: