Difference between revisions of "Create new language files"

From BubbaWiki
Jump to navigation Jump to search
(update to reflect migration to PO translation system from 2.4 and up)
Line 1: Line 1:
Do you want to contribute and add your own language files to B3?&nbsp;Perfect!<br>
[Edit: updated 2012-10-01 to reflect new language system in B3]


Here are the English files that are relevant:<br>
Do you want to contribute and add your own language files to B3?&nbsp;Wonderful.&nbsp;Do like this:  
 
*/usr/share/album/i18n/en/messages.js<br>
*/usr/share/album/i18n/en/messages.php<br>
*/usr/share/web-admin/admin/views/default/i18n/en/bubba_lang.php<br>
*/usr/share/web-admin/admin/views/default/i18n/en/help_lang.php<br>
*/usr/share/web-admin/admin/views/default/i18n/en/messages.js<br>


<br>  
<br>  


If you for example wish to create a Danish version of the B3 user interface, do like this:<br>
#Go to&nbsp;http://b3.update.excito.org/pool/main/b/bubba-frontend/
#Downlod the latest .tar.gz source code file, currently it's 2.5.1.1
#Unpack it and you'll find a folder named 'po'.


1. Log in via SSH and become root.  
That folder contains all source files you need, either to improve a current translation or to create a new one. Use any po file editor to make the translation, for instance&nbsp;[http://www.poedit.net/ www.poedit.net/]. The rest is rather self-explanatory, but if you have questions, don't hesitate to [mailto:support@excito.com ask].&nbsp;<br>


2. Create a new folder called dk under /usr/share/album/i18n/.<br>  
<br>  


3. Create a new folder called dk under /usr/share/web-admin/admin/views/default/i18n/.<br>
In poedit you can either open every single file, or you can use the catalog manager to open all the files at once, to keep a good overview on what's left to do. The structure is:&nbsp;


4. Copy all the files from respectively catalog to the newly created folders (/usr/share/album/i18n/en/* to /usr/share/album/i18n/dk/ and /usr/share/web-admin/admin/views/default/i18n/en/* to /usr/share/web-admin/admin/views/default/i18n/dk/).<br>
<br>  
 
5. Edit the file&nbsp;/usr/share/web-admin/admin/views/default/i18n/dk/description.ini:<br>
<pre>short_name="dk"
long_name="Danish"
status='user'</pre>
6. Now translate the content in the five files listed above, in its new location /dk. <br>  


7. In the UI, change the 'System language' to Danish and verify the result while editing.<br>
*help - all the context-sensitive help information (shown when pressing the question mark in the B2/B3 web UI). One pot-file per help section
 
*js - all strings used by javascript. For technical reasons this had to be separated.&nbsp;
When you are satisfied with the result we would be very happy if you would share it with us. Please start a thread in our forum in the category Development. Name the thread "Language files - Danish" for example. Zip the files and attach it in the thread. We will add the language files so that all users can take advantage of the translations after a software update via the user interface.<br>
*php - all strings used in php code.&nbsp;


<br>  
<br>  


=== To change language settings via the config files  ===
Fire away, and when done, [mailto:support@excito.com email us] or make a new thread in our [[Forum.excito.net|forum]] called "italian translation" or similar, and we'll pull it in for review and publishing. Many thanks in advance for your efforts!&nbsp;
 
The default language setting, edit the file "/home/admin/.bubbacfg" and set "default_lang=en"<br>For each individual user, the language is set in the "/home/user/.bubbacfg" with the "language" variable.<br>


<br>
<br>

Revision as of 11:32, 1 October 2012

[Edit: updated 2012-10-01 to reflect new language system in B3]

Do you want to contribute and add your own language files to B3? Wonderful. Do like this:


  1. Go to http://b3.update.excito.org/pool/main/b/bubba-frontend/
  2. Downlod the latest .tar.gz source code file, currently it's 2.5.1.1
  3. Unpack it and you'll find a folder named 'po'.

That folder contains all source files you need, either to improve a current translation or to create a new one. Use any po file editor to make the translation, for instance www.poedit.net/. The rest is rather self-explanatory, but if you have questions, don't hesitate to ask


In poedit you can either open every single file, or you can use the catalog manager to open all the files at once, to keep a good overview on what's left to do. The structure is: 


  • help - all the context-sensitive help information (shown when pressing the question mark in the B2/B3 web UI). One pot-file per help section
  • js - all strings used by javascript. For technical reasons this had to be separated. 
  • php - all strings used in php code. 


Fire away, and when done, email us or make a new thread in our forum called "italian translation" or similar, and we'll pull it in for review and publishing. Many thanks in advance for your efforts!