Project

General

Profile

Bug #2492

FCKeditor translations break when using sub-language

Added by Yannick Warnier over 8 years ago. Updated about 8 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
-
Target version:
Start date:
05/01/2011
Due date:
% Done:

100%

Estimated time:
0.50 h
Complexity:
Normal
SCRUM pts - complexity:
3

Description

In this case, should be using parent language (there should be an API function for that).


Files

iso_code_problem.png (61.3 KB) iso_code_problem.png Ivan Tcholakov, 06/02/2011 17:31

Associated revisions

Revision b4dd23c3 (diff)
Added by Julio Montoya over 8 years ago

Adding validation to verify existence of an isocode when adding a new sub language + adding a function api_get_platform_isocodes() see #2492

Revision 1d574e46 (diff)
Added by Alex Aragon about 1 year ago

improvement of view lp_view and placing title scorm -refs issue #2492

History

#1

Updated by Ivan Tcholakov over 8 years ago

I don't use this feature, and I am barely familiar with it, so this is just an opinion.

I suppose that by "sub-language" you mean a professional slang.

I tried to create a sub-language, see the attached picture. I think, in the form the mandatory and not allowing duplicate values field "ISO code" has a conceptual problem. It should not stay there. Spanish in universities and in high schools may be in different slangs, but it is Spanish anyway. The ISO code should be inherited from the "parent" language.

We are not such powerful guys to "invent" our ISO codes :-)

#2

Updated by Yannick Warnier over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Yannick Warnier

Agreed, the isocode should inherit by default, but the sublanguage feature is more than just that. It allows you, for example, to define a local language (like Quechua) and fall back to Spanish (which is the most commonly second spoken language of Quechua-speaking people) when a term has no translation in Quechua.

In this case, the ISO code should still be possible to redefine (as the several versions of the Quechua language have their own ISO codes).

#3

Updated by Yannick Warnier over 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Yannick Warnier to Ivan Tcholakov

So to get back to the main issue, where does FCKEditor negotiate the language it uses? (so we can use the parent language instead, when it's a sublanguage).

#4

Updated by Ivan Tcholakov over 8 years ago

See in main/inc/lib/fckeditor/fckeditor.php the private method get_editor_language(), starting from the line 444.

#5

Updated by Yannick Warnier over 8 years ago

  • Target version changed from 1.8.8 alpha to 1.8.8 beta
#6

Updated by Yannick Warnier over 8 years ago

  • Status changed from Needs more info to Assigned
  • Assignee changed from Ivan Tcholakov to Julio Montoya
#7

Updated by Julio Montoya over 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Ivan Tcholakov
  • % Done changed from 0 to 50

i'm adding a fix in order to create a sub language with the same iso code + some fixes when translating a sub language

http://code.google.com/p/chamilo/source/detail?r=cdee9cc3d2ee540740daeb8d7e7aa8da12a05c15&repo=classic

Is there a function that gives me the list of valid iso codes in chamilo? so I can validate what the user enters when creating a new sub language (in the iso code text field) ?

I don't see where FCKeditor translations breaks, because if the file doesn't exist it will take the english by default

$editor_lang = file_exists(api_get_path(SYS_PATH).'main/inc/lib/fckeditor/editor/lang/'.$editor_lang.'.js') ? $editor_lang : 'en';

#8

Updated by Ivan Tcholakov over 8 years ago

I think, there is no such a function for listing all the language codes.

A list about used by the system valid codes may be retrieved from the database, see the table 'main.language', and the field 'isocode'. In the file main/inc/lib/*internationalization.lib.php* there is a function api_get_language_isocode($language = null, $default_code = 'en') { ... }, on which base a new function may be made for listing all the existing in the system ISO-codes.

#10

Updated by Yannick Warnier over 8 years ago

Should I close it or is there anything anyone wants to add?

#11

Updated by Yannick Warnier about 8 years ago

  • Status changed from Needs more info to Bug resolved
  • % Done changed from 70 to 100

OK, I'm closing it. Thanks for your smart work on this!

Also available in: Atom PDF