Skip to content

Conversation

@rammba
Copy link
Contributor

@rammba rammba commented Apr 24, 2025

Hello, as a current Serbian translator for N++, I wanted to translate context menu message as well.

I've noticed that translation was introduced in #25. However, since Serbian language is not that popular and widely used I wasn't sure how to implement this properly.

First thing, I didn't know which IBM code to use for cyrillic and latin version of serbian. Based on the IBM docs mentioned in the issue, or its latest version 6, I should use SRB for cyrillic and SRL for latin. However, when I looked into CultureInfo class, it's ThreeLetterWindowsLanguageName field says that SRO is for cyrillic and SRM for latin. I ended up using AFX_TARG_SRO and AFX_TARG_SRM, but I didn't found proper documentation for what should be used.

Second thing, I didn't succeed in finding documentation for SUBLANG_ values. I've used SUBLANG_SERBIAN_SERBIA_CYRILLIC and SUBLANG_SERBIAN_SERBIA_LATIN which should depend on sr-Cyrl-RS and sr-Latn-RS locales/cultures, but I'm not sure. Only clue that I had is winnt.h file that I have on my Windows 10, which has following content: part of winnt content.txt. There you can see comment stating: WARNING: This pattern is broken and not followed for all languages. Serbian, Bosnian & Croatian are a few examples. If you have any clue where this can be found online, it would be great.
Problem with that approach is how Visual Studio marks SUBLANG_SERBIAN_SERBIA_LATIN. For some reason, it doesn't recognize it as a normal string table, while cyrillic version is ok:
image

@GurliGebis, @xomx, @donho do you have any clue where to find documentation about these topics. Sorry, but I never worked that much deep with languages and locales, so I probably missed something.

@GurliGebis
Copy link
Contributor

I must admit, I don't know enough about translations to figure this out.
@donho any ideas?

@donho donho self-assigned this May 3, 2025
@donho
Copy link
Member

donho commented May 3, 2025

@rammba

Here are the symbols I found in the header of VSStudio (ntdef.h):

...
#define SUBLANG_SAMI_SOUTHERN_SWEDEN                0x07    // Southern Sami (Sweden)
#define SUBLANG_SAMI_SKOLT_FINLAND                  0x08    // Skolt Sami (Finland)
#define SUBLANG_SAMI_INARI_FINLAND                  0x09    // Inari Sami (Finland)
#define SUBLANG_SANSKRIT_INDIA                      0x01    // Sanskrit (India) 0x044f sa-IN
#define SUBLANG_SCOTTISH_GAELIC                     0x01    // Scottish Gaelic (United Kingdom) 0x0491 gd-GB
#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN    0x06    // Serbian (Bosnia and Herzegovina - Latin)
#define SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x07    // Serbian (Bosnia and Herzegovina - Cyrillic)
#define SUBLANG_SERBIAN_MONTENEGRO_LATIN            0x0b    // Serbian (Montenegro - Latn)
#define SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC         0x0c    // Serbian (Montenegro - Cyrillic)
#define SUBLANG_SERBIAN_SERBIA_LATIN                0x09    // Serbian (Serbia - Latin)
#define SUBLANG_SERBIAN_SERBIA_CYRILLIC             0x0a    // Serbian (Serbia - Cyrillic)
#define SUBLANG_SERBIAN_CROATIA                     0x01    // Croatian (Croatia) 0x041a hr-HR
#define SUBLANG_SERBIAN_LATIN                       0x02    // Serbian (Latin)
#define SUBLANG_SERBIAN_CYRILLIC                    0x03    // Serbian (Cyrillic)
#define SUBLANG_SINDHI_INDIA                        0x01    // Sindhi (India) reserved 0x0459
...

And your PR seems correct to me:

image

@donho donho added the accepted Extra attention is needed label May 3, 2025
@donho donho closed this in 98fa2ce May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants