Skip to content

Commit e69537b

Browse files
authored
Language and grammar polish
1 parent 2ac349e commit e69537b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

basemaps/localization.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ However, many places have more than one common local languages and Protomaps pas
2424

2525
- `Switzerland` the country is represented as a complex key, value pair: `name` = `Schweiz/Suisse/Svizzera/Svizra`
2626

27-
For transnational places involving many countries and languages, like `sea` features, the default name value can get quite long and non-unweidly!
27+
For transnational places involving many countries and languages, like `sea` features, the default name value can get quite long and unweidly!
2828

29-
It's recommended to prefer localized names (see blow) when labeling a map, and fallback to this default name when a localized name isn't available.
29+
However, we recommended preferring localized names (see blow) for map labels, and fallback to the default name only when a localized name isn't available.
3030

3131
## Localized `name:*` values
3232

3333
Protomaps structures localized names using the same `name:{language_code}` formatting as OpenStreetMap.
3434

3535
More than 100 countries recognize 2 or more official languages – and some like Bolivia, India, and South Africa recognize more than 10 official languages each!
3636

37-
A single official language is used in most remaining countries. However, there are a few countries where no official language has been designated – like in the United States.
37+
A single official language is used in most remaining countries. There are a few countries where no official language has been designated – like in the United States.
3838

3939
Going back to our London example, English is the predominant (unofficial) langauge in the United Kingdom:
4040

@@ -50,6 +50,7 @@ Extending our London example, many other languages include [exonym and endonym](
5050
- `name:pt` = `Londres`
5151
- `name:zh-Hans` = `伦敦`
5252
- `name:zh-Hant` = `倫敦`
53+
- _... many other localized values..._
5354

5455
Going back to our Switzerland example, each of the local (often official) languages would have a specific language name value (in this case German `de`, French `fr`, Italian `it`, and Romansh `rm`), like:
5556

@@ -76,7 +77,7 @@ _NOTE: The Chinese (`zh`) examples above demonstrates how a single language can
7677

7778
The default (or primary) `name` does not self describe the writing system "script" or character set (alphabetic, stroke-based, or otherwise) used to render the value. When combining with localized `name:*` values. This complicates preferring to "fallback" to another language in the same script family before falling back to characters using a different writing system the reader may not be able to make sense of.
7879

79-
To help solve this, Protomaps characterizes the scipt using in the default `name` value by adding a `pmap:script` tag.
80+
To help solve this, Protomaps characterizes the scipt used in the default `name` value by adding a `pmap:script` tag.
8081

8182
Values in `pmap:script` follow the [ISO 15924](https://unicode.org/iso15924/iso15924-codes.html) standard codes for the representation of names of scripts and are summarized in the table below.
8283

@@ -164,7 +165,7 @@ Protomaps adds additional names for a small set of language scripts, currently j
164165

165166
Rendering text in web browsers works for almost all languages and scripts and feels like magic. However, specialized map renderers like MapLibre have to reimplement text rendering and text layout which is complicated when text needs to be curved along linear map features instead of placed only horizontally or vertically. MapLibre normally assumes a one-to-one mapping between glyphs and Unicode codepoints that also exist in MapLibre font files (aka "font stacks") to accomplish the layout for a large but limited number of scripts. Plugins have been developed to extend MapLibre for **right-to-left** scripts like Arabic and Hebrew, and MapLibre has built-in support for **CJK scripts** like Chinese, Japanese, and Korean.
166167

167-
To facilitate Protomap's support of additional, non-supported scripts in MapLibre (like Devanagari), Protomaps exports names with "positioned glphys" so MapLibre can use codepoints as indices of positioned glyphs in an additional custom "font stack". While the raw `pmap:pgf:name:*` values look like giberish when inspecting the raw values, they will render correctly in MapLibre.
168+
To facilitate Protomap's support of additional, non-supported scripts in MapLibre (like the Devanagari script used by the Hindi language), Protomaps exports names with "positioned glphys" so MapLibre can use codepoints as indices of positioned glyphs in an additional custom "font stack". While the raw `pmap:pgf:name:*` values look like giberish when inspecting the raw values, they render correctly in MapLibre to the end user.
168169

169170
See more:
170171

@@ -173,7 +174,7 @@ See more:
173174

174175
## Styling localized name
175176

176-
Labeling a map is typically localized for a specific language audience by prefering a specific name tag and falling back to similar languages (in the same writing system "script", see above), and finally falling back to the feature's default name.
177+
Labeling a map is typically localized for a specific language audience by prefering a specific name tag and falling back to similar languages (in the same writing system "script", see above), and finally falling back to the feature's default name (which could be in any script, in any language).
177178

178179
### MapLibre
179180

0 commit comments

Comments
 (0)