Types/OpenPackage.Part/get_Culture.ps1
|
<# .SYNOPSIS Gets the culture of the part. .DESCRIPTION Gets the `[CultureInfo]` associated with a package part. #> param() # Get all the culture names $allCultures = [cultureinfo]::GetCultures('all').name # Split the uri into segments foreach ($segment in $this.Uri -split '/' -ne '') { # if any segment is a culture name if ($segment -in $allCultures) { $segment -as [cultureinfo] # it applies to that segment. } } |