Community Forums

Translation

What should the values of the RegEx filed be?


You must be signed-in to post.

AuthorSubject
 
Page: 1
komputist
Subject: What should the values of the RegEx filed be?Quote this post in your reply
When one edits/adds a language in ATutor, there is a required field called "Regular Expression".

I don’t know what the value of this field should be. Please help.

The English package has this: en([-_][[:alpha:]]{2})?|english
The Russian package has this: ru|russian

(To see what I talk about, go to System Preference/Languages and choose to edit a language.)

Looking at the Russian package, as an example, what is this regex expression supposed to do? Is is supposed to search for e.g. Russian text? Or is it supposed to select a line inside the language package itself? The answer to this question could help me understand what the correct string for the languages I translate should be. (For example, the regex string for the English language pack would not select Norwegian texts, as the [:alpha:] part means that it only selects ASCII text.

May be the translation site could be updated to explain this?
Posted: 2015-02-06 17:59:17
greg

Avatar for greg
Subject: Re: What should the values of the RegEx filed be?Quote this post in your reply
The regex for English allows for en, en-us, en-gb. If russian has local variations then it could also use the same regex. If not then ru|russian is all you need.
Posted: 2015-02-06 18:28:17
komputist
Subject: Re: What should the values of the RegEx filed be?Quote this post in your reply
OK. But by «If language x has local variations», do you then really mean «if ATutor has more than one localization for language x»? Because, for example, English does have many variations, as you hint. However, there is only one, English localization package for ATutor.

In reply to:
The regex for English allows for en, en-us, en-gb. If russian has local variations then it could also use the same regex. If not then ru|russian is all you need.

Posted: 2015-02-06 20:13:18
 
Page: 1

You must be signed-in to post.

Related Articles