News for hackers. Stuff that matters.
Re:PureBasic switches to a C backend by codetrotter on Tuesday August 17, 2021 @08:26PM (#28216366)
I don’t agree completely.

If the site is localized into de_DE and fr_FR then it makes perfect sense to use the country flags. In more general terms: When the site is localized into the locale of specific country/nation and that country/nation has that language as its only official language.

The official language of Great Britain is English. The various other languages spoken in the countries that are part of UK are regional/local. So using GB flag for locale en_GB is appropriate.

US flag for en_US.

Brazilian flag for pt_BR.

Portuguese flag for pt_PT.

Whereas for example Canada has both French and English as official languages right. So if you are writing for fr_CA or en_CA locales then it would be inappropriate indeed to use Canadian flag (since in that case it doesn’t say which language), and equally wrong to use French or USA flag because those flags imply fr_FR and en_US. So if either fr_CA or en_CA is among your target locales, either use text for everything instead of flags, or use flags for the locales that have them and text for fr_CA and en_CA. Likewise for other countries with multiple official languages.

Australia apparently has no official language at the federal level. So the Australian flag should not be used for en_AU locale. Instead text should be used for en_AU locale.

Re:PureBasic switches to a C backend by skissane on Tuesday August 17, 2021 @08:42PM (#28216490)
> Likewise, use GB flag for en_GB locale is cool too, and US flag for en_US. Though with English I suspect many sites may actually not be written in British English and yet they might use GB flag. In that case they are using the wrong flag.

A lot of English text isn't clearly identifiable as belonging to a certain dialect. A single text can be a collaborative work between people using different dialects of English and so different parts of the document can end up being spelled in different ways. Spelling differences aren't always as simple as American vs British – -ize spellings are preferred over -ise in American English, yet -ize spelling is also permitted (if less common) in British English (so-called Oxford spelling). I myself speak Australian English, but in certain contexts (especially talking about computers, or at work – I work for a US-based company) I tend to Americanise my English a little bit. Australian English is neither American nor British – it tends to be closer to British mostly (e.g. petrol not gasoline), but sometimes is closer to American instead (e.g. truck not lorry), and sometimes does its own thing–e.g. Americans say bell peppers and the British say sweet peppers but Australians for some reason use the Latin name capsicum (for the mild ones, not the spicy ones) – which is not unique to Australia, New Zealand and Indian English do that too.

Anyway, we don't need to tag documents with the precise dialect of English. We all understand each other pretty well anyway.

Also, locale != language. Locale is about stuff like date formats, number formats, etc. It is rare for a non-interactive website – as opposed to an interactive webapp - to support multiple locales.

Re:PureBasic switches to a C backend by codetrotter on Tuesday August 17, 2021 @08:54PM (#28216560)
> Also, locale != language. Locale is about stuff like date formats, number formats, etc. It is rare for a non-interactive website – as opposed to an interactive webapp - to support multiple locales.

I know. But ideally you’d still be conforming to some sort of locale for each of your chosen languages.

Even static text can refer to dates. And while ISO 8601 really is the proper unambiguous way to refer to all-numeric dates we still have the British and most of rest of the world preferred way of day-month-year, whereas with American English the preferred way is month-day-year.

And likewise, if you are writing for an Australian audience then the assumed currency when you say naked “dollars” will be AUD. Whereas text for Canadian audiences will have CAD being the assumed meaning of naked “dollars”.

And that’s why I mean that there often is a locale tied even to text. But you are absolutely right that it is complicated, and that often smaller sites will be written with a global audience in mind and no clear locale. But then the rule still applies. And since you are then not using en_US nor en_GB etc, but just plain en, there is no flag for that and you’d represent it with text saying just “English”.

Re:PureBasic switches to a C backend by skissane on Tuesday August 17, 2021 @09:18PM (#28216712)
> Even static text can refer to dates. And while ISO 8601 really is the proper unambiguous way to refer to all-numeric dates we still have the British and most of rest of the world preferred way of day-month-year, whereas with American English the preferred way is month-day-year.

It is really only an issue for all numeric dates. If you put the month in words, everyone gets it regardless of the order. Everyone understands that ''4 July'' and ''July 4'' (or ''July 4th'') are the same thing. In fact, in British (and Australian) English, at least, both ways are strictly speaking correct. Month-first is viewed as somewhat old-fashioned but still encountered especially in some very formal contexts. (Actually, a lot of American-British differences are due to American English being more conservative, and failing to adopt changes in the language which later occurred in England, and the differences in date order are an example of that)

> And likewise, if you are writing for an Australian audience then the assumed currency when you say naked “dollars” will be AUD. Whereas text for Canadian audiences will have CAD being the assumed meaning of naked “dollars”.

As an Australian I have no trouble working out what "dollars" means based on context. I will assume it means US dollars unless I am reading an Australian website (or Canadian or New Zealand or so on). Formally tagging the website with a locale is pointless for this. Anyway, one can always be explicit (USD vs AUD or US$ vs AU$), and in my experience a lot of texts are. Explicitness is always the best when dealing with international audiences. And, commonly, Australian news sources will, when reporting international news, give the foreign amount first (USD or EUR or GBP or JPY or whatever) and then an Australian dollar conversion in brackets. (I expect Canadian and New Zealand news sources would do the same thing.)

> And that’s why I mean that there often is a locale tied even to text.

Often, when talking about texts, house style is a more important concept than locale. For example, the United Nations (and its agencies) has its own rules about spelling English words, they mostly follow American conventions (e.g ''World Health Organization'' not ''World Health Organisation'') but sometimes use British spellings instead (e.g ''United Nations Environment Programme'' not ''United Nations Environment Program''). I don't know if you can easily map an organisation's house styles to locales.

The other problem is what is in a locale is often disputed. For example, what is the first day of the week in Australian locale, Sunday or Monday? There is actually no consensus on this question in Australian culture. My wife and I can't agree on it, and even Australian media reflects the lack of consensus [0]. However, interestingly, while the ABC (our national public broadcaster) says the official answer is Monday, Unicode CLDR says Sunday, and most software vendors have followed Unicode. But, Unicode CLDR actually used to say Monday, and someone talked Unicode into changing it. Maybe I should try to talk them into changing it back :)

[0] https://www.abc.net.au/news/2019-08-18/which-day-do-you-cons...

Re:PureBasic switches to a C backend by girvo on Tuesday August 17, 2021 @10:54PM (#28217294)
> Maybe I should try to talk them into changing it back :)

As an Aussie, I'd love to help you with that haha. Unicode is wrong ;)

Re:PureBasic switches to a C backend by skissane on Tuesday August 17, 2021 @10:58PM (#28217316)
https://unicode-org.atlassian.net/browse/CLDR-14795 is the issue.

Maybe it would help convince them if more Australians endorsed the "Monday is first day of week in Australia" position.

On the other hand, I don't want to overwhelm the poor Unicode CLDR developers with too many "me too" comments.

Re:PureBasic switches to a C backend by girvo on Wednesday August 18, 2021 @08:51PM (#28229098)
I'm super impressed by the progress so far! I didn't end up writing my comment of support as it seems like they're amenable to the change based on the work you put in: well done!