
/*
    Addon id: e7709ac2-cc0b-41b1-845d-7528015000ee
    Version: v1.7.8 (stable)
*/


--[[ Make sure sentence exist and also langage exist]]
function Realistic_Police.GetSentence(string)
    local result = "Lang Problem"
    
    local key = string
    if CLIENT and IsValid(Realistic_Police.CurrentComputer) and Realistic_Police.CurrentComputer.IsSBU and Realistic_Police.CurrentComputer:IsSBU() then
        if Realistic_Police.Language[Realistic_Police.Lang] and Realistic_Police.Language[Realistic_Police.Lang][string .. "_SBU"] then
            key = string .. "_SBU"
        end
    end

    local sentence = istable(Realistic_Police.Language[Realistic_Police.Lang]) and Realistic_Police.Language[Realistic_Police.Lang][key] or "Lang Problem"

    if istable(Realistic_Police.Language[Realistic_Police.Lang]) and isstring(sentence) then
        result = sentence
    elseif istable(Realistic_Police.Language["en"]) and isstring(Realistic_Police.Language["en"][sentence]) then
        result = Realistic_Police.Language["en"][sentence]
    end

    return result
end

