Organisation of i18n plug-in
Organisation of i18n plug-in
I'm in the process of upgrading to DataTables 1.10 and have found that the organisation of the language files has changed. Whereas before there was a file called, for example, pt-br.txt
, the equivalent file is now called Portuguese-Brasil.lang
. I'm just wondering what the reason is for this change? It seems to me to be causing two problems if I am trying to write an application that will automatically select the correct language based on the browser's language accept settings:
(1) In order to be able to specify the correct language file, I either have to rename all these files to conform to the old scheme, or else I have to add a look-up table to my application so that I can map 'pt-br' to 'Portuguese-Brasil'
(2) It's difficult to work out what some of these languages are in the 'language-country' scheme. For example, I've got no idea what the difference is between 'Indonesian' and 'Indonesian-Alternative'. Is one just a stylistic preference where two authors cannot agree? Or are they two versions of Indonesian spoken in different countries? If the old naming scheme cannot be re-introduced, would it be possible to include the BCP 47 style language tags in the comments to save us the time of having to work them out and possibly getting them wrong? Or am I missing something?
Campbell
Replies
BCP 47 style language tags sounds like an excellent idea. With them I could also update my build process so you can use either the descriptive name of the tag name.
To be honest I can't remember even I changed it - it must have been years ago! I think it was done to be easier to parse the files when looking for a translation, although I realise that this makes it more difficult to do programmatically.
This. I don't speak Indonesian (the only language I speak from that list of files is English...!), so I'm only able to go by what authors give me and Google translation. In that particular case another author offered another suggestion.
Best thing would be is if they could be merged. If you know anyone who speaks Indonesian I would be grateful if they would have a look.
Allan
OK - thanks.
Campbell