Groups
Groups
Sign in
Groups
Groups
AIR/Flash for Android
Conversations
About
Send feedback
Help
端末の言語環境を取得する方法
38 views
Skip to first unread message
慶二
unread,
Jun 28, 2011, 2:25:20 AM
6/28/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AIR/Flash for Android
いつも参考にさせて頂いております。
Air For Androidでユーザー端末の言語環境を取得する処理を探しております。
Flashでユーザーが設定している言語を取得し、設定言語が日本語だった場合は日本語表記を行い、日本語以外の場合は英語表記を行うといった処理を実
現したいと考えています。
開発環境は、WindowsのFlash CS5.5です。
大まかなコードはこのような感じです。
if(端末の言語設定が日本語)
{
_str="日本語";
} else
{
//日本語でない場合は英語に
_str="English";
}
もし、この「端末の言語設定が日本語」であるかどうかを取得する処理等に心当たりありましたらご教授頂ければ非常に助かります。
yaamaa
unread,
Jun 28, 2011, 2:52:12 AM
6/28/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AIR/Flash for Android
flash.system.Capabilitiesクラスのlanguageプロパティで、取得できそうですよ。
http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#language
古いSDKの記事ですが、参考になります。
http://www.adobe.com/jp/devnet/air/flex/articles/localizing_flex_air_apps.html
ヤマモト
慶二
unread,
Jun 28, 2011, 3:29:24 AM
6/28/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AIR/Flash for Android
ヤマモト様
ありがとうございます!
ご指摘通り、Capabilitiesクラス、languageプロパティで言語環境を取得できました!
//コード
import flash.system.Capabilities;
var lang:String = Capabilities.language;
var _str:String
if(lang=="ja")
{
_str="日本語";
} else
{
//日本語でない場合は英語に
_str="English";
}
//
これで無事アプリがリリースできそうです。
ご教授誠にありがとうございました!
On 6月28日, 午後3:52, yaamaa <
yamamoto.qx770...@gmail.com
> wrote:
> flash.system.Capabilitiesクラスのlanguageプロパティで、取得できそうですよ。
>
>
http://help.adobe.com/ja_JP/FlashPlatform/reference/actionscript/3/fl.
..
>
> 古いSDKの記事ですが、参考になります。
>
>
http://www.adobe.com/jp/devnet/air/flex/articles/localizing_flex_air_.
..
Reply all
Reply to author
Forward
0 new messages