Skip to Content Skip to Menu

how to: new language plugins for own cb plugin?

  • jojo12
  • jojo12
  • OFFLINE
  • Posts: 957
  • Thanks: 109
  • Karma: 25
10 years 3 weeks ago #250317 by jojo12
Hi,
in CB 1.9.1 in my own cb plugin, there was a language file english.php. When I copied this to german.php and translated, I had the translation.
Now in CB 2.0 this doesn't seem to work! Can you say me, how to translate, please?

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 3 weeks ago #250339 by nant

jojo12 wrote: Hi,
in CB 1.9.1 in my own cb plugin, there was a language file english.php. When I copied this to german.php and translated, I had the translation.
Now in CB 2.0 this doesn't seem to work! Can you say me, how to translate, please?


Nope - with CB 2.0 you should really only have language.php and admin_language.php in your language plugin.

I have attached an English language plugin you can use as a basis to create your own language plugin. Please note that this plugin is used for my testing and basically has an ! (exclamation mark) in front of all strings.

Just unzip and make minor modifications to the language.xml file:

name tag should have your language encoding instead of en-GB
version should be 2.0.0 instead of 2.0.0-rc.3
I guess you would want to modify the description
You need to copy your translations to language.php and admin_language.php

Compress folder and install.


File Attachment:

File Name: CB20_en-gb_TEST.zip
File Size:69 KB
Attachments:
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

  • jojo12
  • jojo12
  • OFFLINE
  • Posts: 957
  • Thanks: 109
  • Karma: 25
10 years 3 weeks ago - 10 years 3 weeks ago #250446 by jojo12
Hi nant,
thanks for your explanations.
I changed the language.xml and took the german language.php and admin_language.php into the zipfile (de-de.zip) and installed it via cbplugin-manager.
I got it to work in CB 2.0 on J3.3.6,
BUT installing the same in CB 2.0 on J2.5.27 it installs, but there is not the german translation. Could this be possible?

EDIT:
my solution in J2.5.27 (not ideal) is to use ftp and change folder default_language to default_language_
but this should be resolved better
Last edit: 10 years 3 weeks ago by jojo12.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum