l18Description

20th May 2005 - 23:57
//~ 0.5.3/../locale/ru-RU/imglikeopera.properties
initialDescription=Управление загрузкой графики, настройка работы графического кеша.

//~ 0.5.3/../content/imglikeopera.js
//~ localizing initial description here :o)
//~ "Goofy-method", thanks Luana aka MatrixIsAllOver (extenzilla.it)

ILO_BUNDLE = document.getElementById("imglikeopera-string-bundle");

var iloDescription = Components.classes["@mozilla.org/supports-string;1"]
                               .createInstance(Components.interfaces.nsISupportsString);

iloDescription.data = ILO_BUNDLE.getString("initialDescription");

Components.classes["@mozilla.org/preferences-service;1"]
          .getService(Components.interfaces.nsIPrefService)
          .getBranch("extensions.{b1d008f4-5fcd-4a34-8506-b3143b6caf94}.")
          .setComplexValue("description",
           Components.interfaces.nsISupportsString, iloDescription);
Скриншот менеджера расширений в ru-RU и en-US Firefox, 7kb

Categories: PHP | comments: (1)

Комментарии

1. Anonymous Coward 21st May 2005 - 22:33

Одно непонятно, причём здесь PHP?

Mash:

Смотрите шире: Программист, ага…

Комментарии временно отключены.