Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

Reference · Ship signal flags (International Code of Signals)

signalMeaningfunction

What the flag means, as the Code gives it for a letter, or what it does for a figure, a substitute or the answering pennant, in English or Japanese. The English of a letter is the Code's own words (Pub. 102, "Single letter signals").

Import it

import { signalMeaning } from "@johnmorrisdotca/hata/signals";

Definition

function signalMeaning(id: string, lang?: string): string | null

Parameters

NameTypeDescription
idstring

A flag's id, in any case, with or without ics:.

lang (optional)string

"en" (the default), "ja", or a tag such as "ja-JP".

Returns

string | null

The meaning, or null when the Code has no such flag.

Examples

import { signalMeaning } from "@johnmorrisdotca/hata/signals";

console.log(signalMeaning("ics:a"));       // "I have a diver down; keep well clear at slow speed."
console.log(signalMeaning("ics:a", "ja")); // "ダイバーが潜水中です。十分に離れ、低速で航行してください。"
I have a diver down; keep well clear at slow speed.
ダイバーが潜水中です。十分に離れ、低速で航行してください。

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.31.0.