areh

Active Member
Jul 26, 2002
44
0
156
I'm trying to translate a language file, but there seems to be something wrong. I have tried to ways to translate the system, but none of them works unless I edit the english language file directly.

First, I tried cloning a language file (the utf-8 version). This created an empty file. I wanted to have the english strings as template, so I deleted it again.

Now, I downloaded the x3 template, renamed it to norwegian-utf8. When trying to upload/create new language file now, I got a success message and the location of the file

"C:\diverse\norwegian-utf8 at /usr/local/cpanel/base/frontend/x3/lang/C:\diverse\norwegian-utf8"

I can now see norwegian-utf8 everywhere in dropdown menues, but this disables all the dropdown menues and I can't even edit the default english one. The dropdowns shows the entire local path to my file (the file on my own harddrive) for some reason, maybe this is causing the problem? Update: I logged into my account and the file was saved as C:\diverse.. on the server! So there is a bug with this. I renamed the file from C:\diverse.. to norwegian-utf-8 on the server itself after upload. This fixed the dropdown.

There also seems to be other problems (templates cloned from a template looses it connection to a theme). As long as you stick with english, it works, but when changing it..

Now, after doing manual work on files on server to get it to work, I can not get the norwegian-utf8 to appear in the dropdown in the Edit user/account language window. Only the english ones are displayed, even though the x3 template is selected for this user and the language file exists.

I'm running Release version.
 
Last edited:

CoolMike

Well-Known Member
Sep 6, 2001
313
0
316
Hi

I did the same thing yesterday, but did not have this problem. At least in WHM it looks good and i can edit the language. But in the cpanel theme, i can choose the language, but then nothing happens. It says that the language is changed, but when I go back to the language page, I see that still the english language is choosen.

It's a shame that such a nice controllpanel solution don't have the money to find some real translaters who create at least the most important language files. On lang.cpanel.net, it looks like none of the existing language files where working with X3 theme.

Michael
 

areh

Active Member
Jul 26, 2002
44
0
156
I can also edit the language files for the frontend now, but I can't assign the language file to any cPanel account.

Is it something I'm doing wrong?

I do not get norwegian-utf8 in the dropdown list when I change an account, I only get the english and english-utf8.

I have tried this on two seperate servers running latest Release version.

I do get the norwegian-utf8 in the "Installed language" list for the x3 template, which I'm using for all accounts:

Language ↓ / tree x x3 x3mail
english
english-utf8
norwegian-utf8
 

areh

Active Member
Jul 26, 2002
44
0
156
I have started translating the english language file (to norwegian) to get around this bug. However, not even the english language can be modifed, even the language is in the language file (just a few of them gave visible change cPanel frontend). It looks like the language strings have been put as they should in the language files, but it hasn't been updated in the html templates! That doesn't help much ;)

This seems very buggy and just like previous versions that stopped me from translating those for years too.. it is useless in current state. Either do it complete or do not bother to have the language tools at all. That's my opinion.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
I can also edit the language files for the frontend now, but I can't assign the language file to any cPanel account.

Is it something I'm doing wrong?

I do not get norwegian-utf8 in the dropdown list when I change an account, I only get the english and english-utf8.

I have tried this on two seperate servers running latest Release version.

I do get the norwegian-utf8 in the "Installed language" list for the x3 template, which I'm using for all accounts:

Language ↓ / tree x x3 x3mail
english
english-utf8
norwegian-utf8

I'd start by going to clone a language file

clicking on english-utf8 and calling it norwegian-utf8

once you've done that, edit it for the root and x3 themes
 

CoolMike

Well-Known Member
Sep 6, 2001
313
0
316
What's the reason for the root file? In the x3 file we have all the text for the x3 theme, why is there a root file needed?

Michael
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
What's the reason for the root file? In the x3 file we have all the text for the x3 theme, why is there a root file needed?

Michael
It has some whm keys for the things that have been translated, and all the keys that are shared between x,x2, and x3.
 

baldor

Active Member
Oct 3, 2004
26
0
151
i have tried to Live Edit a Lanaguage File for Turkish translation but i cant find save button. when i close editing window all changes are gone. how can we save our translations?
 

rone

Well-Known Member
Jan 14, 2007
179
0
166
The Netherlands
cPanel Access Level
Root Administrator
i have tried to Live Edit a Lanaguage File for Turkish translation but i cant find save button. when i close editing window all changes are gone. how can we save our translations?
Just at the end (below) of your translations page in the left bottom in that page you see a little button with the txt SAVE, push it and all your hard work will be saved.

succes
 

baldor

Active Member
Oct 3, 2004
26
0
151
Just at the end (below) of your translations page in the left bottom in that page you see a little button with the txt SAVE, push it and all your hard work will be saved.

succes
thanks for reply. i have updated cpanel/whm to lastest version then try to edit lang file with live edit on mozilla firefox, but again it dit not saved. then i tried this on explorer and worked. problem is about firefox.
 

baldor

Active Member
Oct 3, 2004
26
0
151
there is a problem with live editing. when i try to use html tags, i got error.

for example

Code:
<b>Important</b>
cpanel changes it like this

Code:
&lt;b&gt;Important:&lt;/b&gt;
this is very bad, is there any idea for solving this problem?
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
there is a problem with live editing. when i try to use html tags, i got error.

for example

Code:
<b>Important</b>
cpanel changes it like this

Code:
&lt;b&gt;Important:&lt;/b&gt;
this is very bad, is there any idea for solving this problem?
This is a confirmed problem, < and > get xss protected when they shouldn't.

It will be fixed in Tuesdays build or sooner.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,481
35
208
cPanel Access Level
DataCenter Provider
thanks for reply. i have updated cpanel/whm to lastest version then try to edit lang file with live edit on mozilla firefox, but again it dit not saved. then i tried this on explorer and worked. problem is about firefox.
Are you using the live editor, or the whm editor?

Are you using firefox 1.5, 2.x or 3.x ?
 

areh

Active Member
Jul 26, 2002
44
0
156
Difficult to understand ;)


Step by step
1. Clone/Create a New Language
2. Language: english-utf8 File/theme: Root, Addons & All Themes
3. Theme(s): [root and addon specific language files] (/) , tree , x , x2 , x3 , x3mail , xmail
Target (new) Language: norwegian-utf8
4. Copy/Clone

So far, so good. See output #1 below for full response from system. The norwegian-utf8 is now optionable in the "Change account" feature in WHM.

Now, I go into editor

1. Edit a Language File
2. "Select a language to edit". Only norwegian-utf8 in file/theme Root langauge file is chooseable (can't edit spesific on x3, like you can if you choose english-utf8). So I though that I maybe needed to clone the x3 also (but only one clone is allowed, when I tried to create a clone only of x3, it says that is is already created. If I delete the cloned Root, Addons & All Themes, then I can clone it, but then I'm also missing strings).
3. I edit the norwegian-utf8/Root langauge file, as it is the only one optionable in the dropdown. I use IE and tried to search, but I can't find "Main Domain" and other important strings I can find in english language file. Also, it seems like the language file is missing several strings.

I have created, deleted and recreated this process again and again. I have also tried to only edit x3 theme, but anyhow I do it, I end up missing strings that is in the original english one?



WHM 11.1.0 cPanel 11.4.11-R13914
WHM X v3.1.0







OUTPUT #1
Code:
Copying base language file ....
`/usr/local/cpanel/lang/english-utf8' -> `/usr/local/cpanel/lang/norwegian-utf8' 

Copying addon specific files ....


Copying theme specific files ....
`/usr/local/cpanel/base/frontend/tree/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/tree/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/default/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/default/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/y/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/y/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/advanced/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/advanced/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/YES/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/YES/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/NO/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/NO/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/x3/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/x3/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/iconic/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/iconic/lang/norwegian-utf8' 
`/usr/local/cpanel/base/frontend/x3mail/lang/english-utf8' -> `/usr/local/cpanel/base/frontend/x3mail/lang/norwegian-utf8' 

Done.

The following language files have been created: 


/usr/local/cpanel/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/tree/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/default/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/y/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/advanced/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/YES/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/NO/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/x3/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/iconic/lang/norwegian-utf8
/usr/local/cpanel/base/frontend/x3mail/lang/norwegian-utf8
 
Last edited:

areh

Active Member
Jul 26, 2002
44
0
156
After walking forward and backwards in the system, I finally got it to show norwegian and utf-8. Since it is very difficult to edit langauge file from the editor in whm, I downloaded the utf-8 langauge files both for root and x3.

When I upload a language file after I have downloaded it to correct something, it is stored like this on the server:

"Installed C:\tmp\lang\x3\norwegian-utf8 at /usr/local/cpanel/base/frontend/x3/lang/C:\tmp\lang\x3\norwegian-utf8"

So the local path becomes the filename (see c:\tmp\lang..), instead of just the filename. So you basically can't edit a language file and then re-upload it with changes.
 

areh

Active Member
Jul 26, 2002
44
0
156
I have started editing the langauge files manually and using ftp for transfering them.

I have been able to find most language strings, but one example of text that is in the langauge file, but that is not shown in my langauge is below. All the other text on the same page couild be translated.


contact_index_1=E-postadresse som du kan bli kontaktet på. Dette bør være en e-postadresse som ikke er på din konto, Vi vil sende viktig informasjon hit ved informasjon om nedetid etc.
contact_index_2=Dersom du ønsker å bli varslet på en annen adresse i tillegg, skriv den inn her.
contact_index_3=Send beskjed per e-post når du når maks diskforbruk (du vil ikke motta epost når du når grensen).
contact_index_4=Send beskjed når du når maks båndbredde (trafikk) for inneværende måned.
contact_index_5=Send beskjed når når du når maks kvote angitt for en av dine epostkontoer.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
16
313
Houston, TX
cPanel Access Level
Root Administrator
How can I set the default language for some theme, for all cPanel accounts. I just can't find such option...
That option does not yet exist. If you would like to see this functionality added to cPanel/WHM, please vote for the following bug:

http://bugzilla.cpanel.net/show_bug.cgi?id=2621

Additionally, add yourself as CC so you are informed of updates regarding the implementation of this functionality.