$DatabaseServer = "";
$DatabaseName = "";
$ApplicationObjectFilePath = "";
$LanguageToTestFor = "ENU","DAN";
$PathDynamicsNavManagement = "";
$PathDynamicsNavModelTools = "";
Import-Module $PathDynamicsNavManagement;
Import-Module $PathDynamicsNavModelTools -disablenamechecking;
$AllobjectsPath = $ApplicationObjectFilePath + "Objects\"
if (!(Test-Path $AllobjectsPath)) {
New-Item -ItemType directory -Path $AllobjectsPath
}
$FilePath = $ApplicationObjectFilePath + $DatabaseName + ".txt";
Export-NAVApplicationObject -DatabaseServer $DatabaseServer -DatabaseName $DatabaseName -Path $FilePath -ExportTxtSkipUnlicensed -Force
Split-NAVApplicationObjectFile -Source $FilePath -Destination $AllobjectsPath
$Files = Get-ChildItem ($AllobjectsPath + "*.txt")
foreach ($file in $files) {
Test-NAVApplicationObjectLanguage -Source $file -LanguageId $LanguageToTestFor -ErrorAction SilentlyContinue -ErrorVariable LangError
if($LangError) {
"Missing caption in object: {0}" -f $file.BaseName
$LangError.Clear()
}
}