Test-NAVApplicationObjectLanguage

Tests captions in Business Central application objects to test to validate if they have translated strings for the specified languages.

Syntax

Test-NAVApplicationObjectLanguage
    [-Source] <String[]>
    [-LanguageId] <String[]>
    [-PassThru]
    [<CommonParameters>]

Description

Use the Test-NAVApplicationObjectLanguage cmdlet to validate captions in Business Central application objects. The cmdlet tests all multilanguage strings to verify if the objects have translated strings for the specified languages.

Examples

EXAMPLE 1

PS C:\>Test-NAVApplicationObjectLanguage -Source TAB14.TXT -LanguageId ESP

This example tests the application object in the TAB14.txt file for captions in Spanish. If nothing is returned, the object has captions in ESP. If one or more captions in ESP are missing, a technical error is shown.

EXAMPLE 2

PS C:\>Test-NAVApplicationObjectLanguage -Source .\RESULT\*.TXT -LanguageId DAN

This example tests the application objects in the RESULT folder for captions in Danish. If nothing is returned, the object has captions in DAN. If one or more captions in DAN are missing, a technical error is shown.

EXAMPLE 3

PS C:\>   try {

          Test-NAVApplicationObjectLanguage -Source TAB14.TXT -LanguageId ESP -ErrorAction Stop

          }

          catch

          {

          Write-Host "One or more translations are missing for the ESP language." -ForegroundColor Yellow

          }

This example tests the application object in the TAB14.txt file for captions in Spanish. If nothing is returned, the object has captions in ESP. If one or more captions in ESP are missing, an error is shown with the text that you specified.

Parameters

-LanguageId

Specifies the language or list of languages that you want to test for, such as "DEU". If you do not set this parameter, all available languages are tested.

Type:String[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Specifies if you want to return a collection of objects that describe the missing translations.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Source

Specifies the text file or folder that contains the Business Central application objects that you want to test. The cmdlet does not modify these text files.

Type:String[]
Aliases:PSPath
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False