Howto: Adding an unsupported language
-
Some notes which may be useful to others. I wanted to add Welsh as a back-end language.
Install the plugin.
On Settings -> Native Dashboard, ensure “Extend Backend Admin Bar” is ticked, or it won’t work.
Also ticked “Extend Personal Profile Settings” to allow individual users to choose tehir own back-end language.Download the current Welsh version from https://cy.www.ads-software.com/ and untar.
Copy the following files from wordpress/wp-content/languages/ to <your_server>/wp-content/languages/:
admin-cy.mo
admin-network-cy.mo
continents-cities-cy.mo
cy.mo
This is not strictly necessary, but it’s neater to also rename them to the standard i18n format:
admin-cy_GB.mo
admin-network-cy_GB.mo
continents-cities-cy_GB.mo
cy_GB.moIn wp-content/plugins/wp-native-dashboard, open language-names.php and add the line:
‘cy’ => ‘Cymraeg’,
above:
‘da’ => ‘Dansk’,Copy the Welsh flag into the img/countries folder, naming it cy_GB.gif.
Make a copy of that and name it cy.gif.
The images are gifs of dimensions 18 x 12.In the css folder, open style.css and add the lines:
.csp-cy { background:transparent url(../img/countries/cy.gif) no-repeat 2px top !important; }
.csp-cy_GB { background:transparent url(../img/countries/cy_GB.gif) no-repeat 2px top !important; }
before the line:
.csp-da { background:transparent url(../img/countries/da.gif) no-repeat 2px top !important; }Refresh the Native Dashboard settings – you should now see Cymraeg listed as an installed language, and it should be appearing in the language switcher in the top left-hand corner.
To set Welsh as the front-end (user-facing) default, in wp-config.php, edit:
define(‘WPLANG’, ”);
to read:
define(‘WPLANG’, ‘cy_GB’);
- The topic ‘Howto: Adding an unsupported language’ is closed to new replies.