Language in CumulusUtils: Difference between revisions

m
Line 7: Line 7:
The language for ''CumulusUtils'' is set in the [[Cumulusutils.ini|cumulusutils.ini]] file with the parameter - surprise, surprise - ''Language''. The default language is '''British English''' and after the first run - when the inifile is created - the user can change the language.
The language for ''CumulusUtils'' is set in the [[Cumulusutils.ini|cumulusutils.ini]] file with the parameter - surprise, surprise - ''Language''. The default language is '''British English''' and after the first run - when the inifile is created - the user can change the language.


The choice has been made to use the [https://docs.microsoft.com/en-gb/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f Windows Language Code Identifier (LCID) Reference] (you will find the codes in this [https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf pdf document]) with only the five position codes as valid. So for British English the code '''en-GB''' is used. The first two digits determine the language, the last two digits determine the country.  
The choice has been made to use the [https://docs.microsoft.com/en-gb/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f Windows Language Code Identifier (LCID) Reference] (you will find the codes in this [https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d.pdf pdf document]) with only the five position codes as valid. So for British English the code '''en-GB''' is used. The first two digits determine the language, the last two digits determine the country and therefore the [https://en.wikipedia.org/wiki/Locale_(computer_software) locale].  


Any entry a language code other than five digits or invalid language or country will trigger an error and fall back to the default en-GB.  
NOTE: be aware, that using a locale different from the one used for CumulusMX you may run into problems. Especially the abbreviated month names cause trouble because they are used for creating the file names for the monthly log files. If you doe not seem to be able to solve the issue, please contact [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=9016 @HansR] on the forum.


Both the [[CumulusUtils Gauges]] and the [[CumulusUtils Graphs]] (made with [https://www.highcharts.com/ HighCharts]) have their own language subsystem. If anywhere the languages don't match it is seen as an error with a fall back to the default of en-GB. The gauges language file (''language.js'') is part of the gauges subsystem but can be modified in concertation with [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=2711 Mark Crossley] who then will put it back into the gauges repository and I will take it up in the ''CumulusUtils'' distribution. An example of this is the the now presence of two Norwegian languages. A new language must also be acknowledged to [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=9016 HansR] for ''CumulusUtils'' to make the new language code accepted.
Any entry of a language code other than five digits or invalid language or country will trigger an error and fall back to the default en-GB.
 
Both the [[CumulusUtils Gauges]] and the [[CumulusUtils Graphs]] (made with [https://www.highcharts.com/ HighCharts]) have their own language subsystem. If anywhere the languages don't match it is seen as an error with a fall back to the default of en-GB. The gauges language file (''language.js'') is part of the gauges subsystem but can be modified in concertation with [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=2711 Mark Crossley] who then will put it back into the gauges repository and I will take it up in the ''CumulusUtils'' distribution. An example of this is the the now presence of two Norwegian languages. A new language must also be acknowledged by [https://cumulus.hosiene.co.uk/memberlist.php?mode=viewprofile&u=9016 HansR] for ''CumulusUtils'' to make the new language code accepted.


The current languages defined and accepted are:
The current languages defined and accepted are: