Using AMOS tool for language pack translation

How many words in the English language pack?

 
Picture of Helen Foster
How many words in the English language pack?
by Helen Foster - Tuesday, 18 March 2014, 11:07 PM
 

I'm occasionally contacted by companies wishing to contribute to language packs on behalf of their clients. They want to know the word count for strings in the English language pack to help price up the cost of the translation work. Thus I thought it would be helpful to share translation coordinator Koen's answer to this question:

The total number of strings can be found on the download page http://download.moodle.org/langpack/2.6/. For 2.6, it is very close to 20000 strings, which is an awful lot. That said, there is a difference between a usable language pack and a complete language pack. I estimate that about 40% complete can be usable, providing the right 40% is translated. In Moodle it is not possible to figure out which strings are for administration and which for students, however the doc Translation priority gives a guide.

AMOS does not provide a word count. You could though download the English language pack and ask a PHP developer or Linux scripting guru to write a tool for counting the number of words.

Has anyone else any advice on how to obtain a word count for the English language pack? If so, please reply.

Picture of José Miguel Andonegi Martínez
Er: How many words in the English language pack?
by José Miguel Andonegi Martínez - Wednesday, 19 March 2014, 1:20 AM
 

Hi Helen:

This tutorial explains how to create a Translation Memory out of Moodle files. I think it is very useful to have a TM so that you can search for similar translations.

The procedure is quite long, so, it would be great if AMOS could generate a TM automatically. This forum thread discusses about it.

http://lang.moodle.org/mod/forum/discuss.php?d=3398

I must update the English-Basque TM with 2.6 texts, so I can have soon an estimation of the number of words.

Picture of Ralf Hilgenstock
Re: How many words in the English language pack?
by Ralf Hilgenstock - Wednesday, 19 March 2014, 1:34 AM
Language pack maintainers

The answer is 369094. This is estimated only.

How to calculate?

en lang pack has 995 files.
Each file has the same general text with 153 words.Each lang string has 2 words that are not to translate 'string name' and '='.

I put now all lang files into one new file (CMD is your friend) and created an text file. This file has 622649 words by OO Writer text count.

I sorted the file alphabetical and found 50.660 strings. Actually I can't explain the difference to 20.000 we  counted earlier.

The rest is a simple calculation.

Total number of words 622649
minus
995 files x 153 general text words
minus
50.660 strings x 2 words
total
369.094 words

The difference of 30.000 strings makes 60.000 words

 

Hope this helps.

 

Picture of Mitja Podreka
Odg: How many words in the English language pack?
by Mitja Podreka - Wednesday, 19 March 2014, 6:03 PM
 

Did some scripting practice. There there are:

  • 121,386 words (751,889 characters) in Moodle 2.6
  • 316,379 words (1,965,443 characters) in English language pack
Picture of David Mudrák
Re: Odg: How many words in the English language pack?
by David Mudrák - Wednesday, 19 March 2014, 10:47 PM
Language pack maintainers
Does it include add-ons?
Picture of Mitja Podreka
Odg: Re: Odg: How many words in the English language pack?
by Mitja Podreka - Thursday, 20 March 2014, 7:02 PM
 

Yes. In English language pack there are 1186 files, while in Moodle (fresh from Git) I could find 'only' 387 files containing language strings.